From 224bd8b701d6c478787658f68b3dad0c3a4bad36 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Thu, 7 Nov 2024 05:06:28 +0800 Subject: [PATCH 01/44] fix: Simplify Contract Subscriptions block range (#744) * fix: Simplify Contract Subscriptions block range * Fix build * logs * undo try/catch --------- Co-authored-by: Prithvish Baidya --- src/db/chainIndexers/getChainIndexer.ts | 4 +- src/utils/env.ts | 6 - src/utils/indexer/getBlockTime.ts | 67 ++---- src/worker/indexers/chainIndexerRegistry.ts | 80 +++--- src/worker/listeners/chainIndexerListener.ts | 19 +- src/worker/tasks/chainIndexer.ts | 227 +++++++++--------- src/worker/tasks/manageChainIndexers.ts | 2 +- src/worker/tasks/processEventLogsWorker.ts | 30 +-- .../tasks/processTransactionReceiptsWorker.ts | 1 + test/e2e/tests/utils/getBlockTime.test.ts | 11 + 10 files changed, 195 insertions(+), 252 deletions(-) create mode 100644 test/e2e/tests/utils/getBlockTime.test.ts diff --git a/src/db/chainIndexers/getChainIndexer.ts b/src/db/chainIndexers/getChainIndexer.ts index 73f7ab839..cfe1ada01 100644 --- a/src/db/chainIndexers/getChainIndexer.ts +++ b/src/db/chainIndexers/getChainIndexer.ts @@ -1,4 +1,4 @@ -import { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetLastIndexedBlockParams { @@ -45,5 +45,5 @@ export const getBlockForIndexing = async ({ "chainId"=${chainId} FOR UPDATE NOWAIT `; - return lastIndexedBlock[0]["lastIndexedBlock"]; + return lastIndexedBlock[0].lastIndexedBlock; }; diff --git a/src/utils/env.ts b/src/utils/env.ts index f323822a7..5a8d13f00 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -69,10 +69,6 @@ export const env = createEnv({ SDK_BATCH_TIME_LIMIT: z.coerce.number().default(0), SDK_BATCH_SIZE_LIMIT: z.coerce.number().default(100), ENABLE_KEYPAIR_AUTH: boolEnvSchema(false), - CONTRACT_SUBSCRIPTIONS_DELAY_SECONDS: z.coerce - .number() - .nonnegative() - .default(0), REDIS_URL: z.string(), SEND_TRANSACTION_QUEUE_CONCURRENCY: z.coerce.number().default(200), CONFIRM_TRANSACTION_QUEUE_CONCURRENCY: z.coerce.number().default(200), @@ -125,8 +121,6 @@ export const env = createEnv({ SDK_BATCH_TIME_LIMIT: process.env.SDK_BATCH_TIME_LIMIT, SDK_BATCH_SIZE_LIMIT: process.env.SDK_BATCH_SIZE_LIMIT, ENABLE_KEYPAIR_AUTH: process.env.ENABLE_KEYPAIR_AUTH, - CONTRACT_SUBSCRIPTIONS_DELAY_SECONDS: - process.env.CONTRACT_SUBSCRIPTIONS_DELAY_SECONDS, REDIS_URL: process.env.REDIS_URL, SEND_TRANSACTION_QUEUE_CONCURRENCY: process.env.SEND_TRANSACTION_QUEUE_CONCURRENCY, diff --git a/src/utils/indexer/getBlockTime.ts b/src/utils/indexer/getBlockTime.ts index 4c279c5a6..3454bb100 100644 --- a/src/utils/indexer/getBlockTime.ts +++ b/src/utils/indexer/getBlockTime.ts @@ -1,49 +1,26 @@ -import { getSdk } from "../cache/getSdk"; -import { logger } from "../logger"; +import { eth_getBlockByNumber, getRpcClient } from "thirdweb"; +import { getChain } from "../chain"; +import { thirdwebClient } from "../sdk"; -const KNOWN_BLOCKTIME_SECONDS = { - 1: 12, - 137: 2, -} as Record; +export const getBlockTimeSeconds = async ( + chainId: number, + blocksToEstimate: number, +) => { + const chain = await getChain(chainId); + const rpcRequest = getRpcClient({ + client: thirdwebClient, + chain, + }); -const DEFAULT_BLOCKTIME_SECONDS = 10; -const BLOCKS_TO_ESTIMATE = 100; + const latestBlock = await eth_getBlockByNumber(rpcRequest, { + blockTag: "latest", + includeTransactions: false, + }); + const referenceBlock = await eth_getBlockByNumber(rpcRequest, { + blockNumber: latestBlock.number - BigInt(blocksToEstimate), + includeTransactions: false, + }); -export const getBlockTimeSeconds = async (chainId: number) => { - if (KNOWN_BLOCKTIME_SECONDS[chainId]) { - return KNOWN_BLOCKTIME_SECONDS[chainId]; - } - - const sdk = await getSdk({ chainId }); - const provider = sdk.getProvider(); - try { - const latestBlockNumber = await provider.getBlockNumber(); - const blockNumbers = Array.from( - { length: BLOCKS_TO_ESTIMATE }, - (_, i) => latestBlockNumber - i - 1, - ); - - const blocks = await Promise.all( - blockNumbers.map(async (blockNumber) => { - const block = await provider.getBlock(blockNumber); - return block; - }), - ); - - let totalTimeDiff = 0; - for (let i = 0; i < blocks.length - 1; i++) { - totalTimeDiff += blocks[i].timestamp - blocks[i + 1].timestamp; - } - - const averageBlockTime = totalTimeDiff / (blocks.length - 1); - return averageBlockTime; - } catch (error) { - logger({ - service: "worker", - level: "error", - message: `Error estimating block time for chainId ${chainId}:`, - error, - }); - return DEFAULT_BLOCKTIME_SECONDS; - } + const diffSeconds = latestBlock.timestamp - referenceBlock.timestamp; + return Number(diffSeconds) / (blocksToEstimate + 1); }; diff --git a/src/worker/indexers/chainIndexerRegistry.ts b/src/worker/indexers/chainIndexerRegistry.ts index 334483c4f..df37adde8 100644 --- a/src/worker/indexers/chainIndexerRegistry.ts +++ b/src/worker/indexers/chainIndexerRegistry.ts @@ -1,67 +1,57 @@ import cron from "node-cron"; -import { getConfig } from "../../utils/cache/getConfig"; -import { env } from "../../utils/env"; import { getBlockTimeSeconds } from "../../utils/indexer/getBlockTime"; import { logger } from "../../utils/logger"; -import { createChainIndexerTask } from "../tasks/chainIndexer"; +import { handleContractSubscriptions } from "../tasks/chainIndexer"; +// @TODO: Move all worker logic to Bullmq to better handle multiple hosts. export const INDEXER_REGISTRY = {} as Record; export const addChainIndexer = async (chainId: number) => { if (INDEXER_REGISTRY[chainId]) { + return; + } + + // Estimate the block time in the last 100 blocks. Default to 2 second block times. + let blockTimeSeconds: number; + try { + blockTimeSeconds = await getBlockTimeSeconds(chainId, 100); + } catch (error) { logger({ service: "worker", - level: "warn", - message: `Chain Indexer already exists: ${chainId}`, + level: "error", + message: `Could not estimate block time for chain ${chainId}`, + error, }); - return; + blockTimeSeconds = 2; } - - let processStarted = false; - const config = await getConfig(); - - // Estimate block time. - const blockTimeSeconds = await getBlockTimeSeconds(chainId); - - const blocksIn5Seconds = Math.round((1 / blockTimeSeconds) * 5); - const maxBlocksToIndex = Math.max( - config.maxBlocksToIndex, - blocksIn5Seconds * 4, - ); - - // Compute block offset based on delay. - // Example: 10s delay with a 3s block time = 4 blocks offset - const toBlockOffset = env.CONTRACT_SUBSCRIPTIONS_DELAY_SECONDS - ? Math.ceil(env.CONTRACT_SUBSCRIPTIONS_DELAY_SECONDS / blockTimeSeconds) - : 0; - - const handler = await createChainIndexerTask({ - chainId, - maxBlocksToIndex, - toBlockOffset, - }); - const cronSchedule = createScheduleSeconds( Math.max(Math.round(blockTimeSeconds), 1), ); - logger({ service: "worker", level: "info", - message: `Indexing contracts on chainId: ${chainId} with schedule: ${cronSchedule}, max blocks to index: ${maxBlocksToIndex}`, + message: `Indexing contracts on chain ${chainId} with schedule: ${cronSchedule}`, }); + let inProgress = false; + const task = cron.schedule(cronSchedule, async () => { - if (!processStarted) { - processStarted = true; + if (inProgress) { + return; + } - try { - await handler(); - } catch (error) { - // do nothing - } finally { - processStarted = false; - } + inProgress = true; + try { + await handleContractSubscriptions(chainId); + } catch (error) { + logger({ + service: "worker", + level: "error", + message: `Failed to index on chain ${chainId}`, + error, + }); + } finally { + inProgress = false; } }); @@ -70,13 +60,7 @@ export const addChainIndexer = async (chainId: number) => { export const removeChainIndexer = async (chainId: number) => { const task = INDEXER_REGISTRY[chainId]; - if (!task) { - logger({ - service: "worker", - level: "warn", - message: `Chain Indexer doesn't exist: ${chainId}`, - }); return; } diff --git a/src/worker/listeners/chainIndexerListener.ts b/src/worker/listeners/chainIndexerListener.ts index 2843ca3ed..e7be532dc 100644 --- a/src/worker/listeners/chainIndexerListener.ts +++ b/src/worker/listeners/chainIndexerListener.ts @@ -1,30 +1,13 @@ import cron from "node-cron"; import { getConfig } from "../../utils/cache/getConfig"; import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; import { manageChainIndexers } from "../tasks/manageChainIndexers"; let processChainIndexerStarted = false; let task: cron.ScheduledTask; export const chainIndexerListener = async (): Promise => { - if (!redis) { - logger({ - service: "worker", - level: "warn", - message: `Chain Indexer Listener not started, Redis not available`, - }); - return; - } - - logger({ - service: "worker", - level: "info", - message: `Listening for indexed contracts`, - }); - const config = await getConfig(); - if (!config.indexerListenerCronSchedule) { return; } @@ -41,7 +24,7 @@ export const chainIndexerListener = async (): Promise => { logger({ service: "worker", level: "warn", - message: `manageChainIndexers already running, skipping`, + message: "manageChainIndexers already running, skipping", }); } }); diff --git a/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chainIndexer.ts index c09afdbc8..a7fbcc304 100644 --- a/src/worker/tasks/chainIndexer.ts +++ b/src/worker/tasks/chainIndexer.ts @@ -1,135 +1,128 @@ -import { StaticJsonRpcBatchProvider } from "@thirdweb-dev/sdk"; -import { Address } from "thirdweb"; +import { + eth_blockNumber, + eth_getBlockByNumber, + getRpcClient, + type Address, +} from "thirdweb"; import { getBlockForIndexing } from "../../db/chainIndexers/getChainIndexer"; import { upsertChainIndexer } from "../../db/chainIndexers/upsertChainIndexer"; import { prisma } from "../../db/client"; import { getContractSubscriptionsByChainId } from "../../db/contractSubscriptions/getContractSubscriptions"; -import { getSdk } from "../../utils/cache/getSdk"; +import { getChain } from "../../utils/chain"; import { logger } from "../../utils/logger"; +import { thirdwebClient } from "../../utils/sdk"; import { ProcessEventsLogQueue } from "../queues/processEventLogsQueue"; import { ProcessTransactionReceiptsQueue } from "../queues/processTransactionReceiptsQueue"; -export const createChainIndexerTask = async (args: { - chainId: number; - maxBlocksToIndex: number; - toBlockOffset: number; -}) => { - const { chainId, maxBlocksToIndex, toBlockOffset } = args; +// A reasonable block range that is within RPC limits. +// The minimum job time is 1 second, so this value should higher than the # blocks per second +// on any chain to allow catching up if delayed. +const MAX_BLOCK_RANGE = 500; - const chainIndexerTask = async () => { - try { - await prisma.$transaction( - async (pgtx) => { - let fromBlock; - try { - fromBlock = await getBlockForIndexing({ chainId, pgtx }); - } catch (error) { - // row is locked, return - return; - } +export const handleContractSubscriptions = async (chainId: number) => { + const chain = await getChain(chainId); + const rpcRequest = getRpcClient({ + client: thirdwebClient, + chain, + }); - const sdk = await getSdk({ chainId }); - const provider = sdk.getProvider(); - const currentBlockNumber = - (await provider.getBlockNumber()) - toBlockOffset; + await prisma.$transaction( + async (pgtx) => { + let fromBlock: number; + try { + fromBlock = await getBlockForIndexing({ chainId, pgtx }); + } catch { + // row is locked, return + return; + } - // Limit toBlock to avoid hitting rate or block range limits when querying logs. - const toBlock = Math.min( - currentBlockNumber, - fromBlock + maxBlocksToIndex, - ); - - // No-op if fromBlock is already up-to-date. - if (fromBlock >= toBlock) { - return; - } + // Cap the range to avoid hitting rate limits or block range limits from RPC. + const latestBlockNumber = await eth_blockNumber(rpcRequest); + const toBlock = Math.min( + Number(latestBlockNumber), + fromBlock + MAX_BLOCK_RANGE, + ); - // Ensure that the block data exists. - // Sometimes the RPC nodes do not yet return data for the latest block. - const block = await provider.getBlockWithTransactions(toBlock); - if (!block) { - logger({ - service: "worker", - level: "warn", - message: `Block data not available: ${toBlock} on chain: ${chainId}, url: ${ - (provider as StaticJsonRpcBatchProvider).connection.url - }. Will retry in the next cycle.`, - }); - return; - } + // No-op if fromBlock is already up-to-date. + if (fromBlock >= toBlock) { + return; + } - const contractSubscriptions = await getContractSubscriptionsByChainId( - chainId, - true, - ); + // Ensure that the block data exists. + // Sometimes the RPC nodes do not yet return data for the latest block. + const block = await eth_getBlockByNumber(rpcRequest, { + blockNumber: BigInt(toBlock), + }); + if (!block) { + logger({ + service: "worker", + level: "warn", + message: `Block ${toBlock} data not available on chain ${chainId} yet.`, + }); + return; + } - // Identify contract addresses + event names to parse event logs, if any. - const eventLogFilters: { - address: Address; - events: string[]; - }[] = contractSubscriptions - .filter((c) => c.processEventLogs) - .map((c) => ({ - address: c.contractAddress as Address, - events: c.filterEvents, - })); - if (eventLogFilters.length > 0) { - await ProcessEventsLogQueue.add({ - chainId, - fromBlock, - toBlock, - filters: eventLogFilters, - }); - } + const contractSubscriptions = await getContractSubscriptionsByChainId( + chainId, + true, + ); - // Identify addresses + function names to parse transaction receipts, if any. - const transactionReceiptFilters: { - address: Address; - functions: string[]; - }[] = contractSubscriptions - .filter((c) => c.processTransactionReceipts) - .map((c) => ({ - address: c.contractAddress as Address, - functions: c.filterFunctions, - })); - if (transactionReceiptFilters.length > 0) { - await ProcessTransactionReceiptsQueue.add({ - chainId, - fromBlock, - toBlock, - filters: transactionReceiptFilters, - }); - } + // Identify contract addresses + event names to parse event logs, if any. + const eventLogFilters: { + address: Address; + events: string[]; + }[] = contractSubscriptions + .filter((c) => c.processEventLogs) + .map((c) => ({ + address: c.contractAddress as Address, + events: c.filterEvents, + })); + if (eventLogFilters.length > 0) { + await ProcessEventsLogQueue.add({ + chainId, + fromBlock, + toBlock, + filters: eventLogFilters, + }); + } - // Update the latest block number. - try { - await upsertChainIndexer({ - pgtx, - chainId, - currentBlockNumber: toBlock, - }); - } catch (error) { - logger({ - service: "worker", - level: "error", - message: `Failed to update latest block number - Chain Indexer: ${chainId}`, - error: error, - }); - } - }, - { - timeout: 60 * 1000, // 1 minute timeout - }, - ); - } catch (err: any) { - logger({ - service: "worker", - level: "error", - message: `Failed to index: ${chainId}`, - error: err, - }); - } - }; + // Identify addresses + function names to parse transaction receipts, if any. + const transactionReceiptFilters: { + address: Address; + functions: string[]; + }[] = contractSubscriptions + .filter((c) => c.processTransactionReceipts) + .map((c) => ({ + address: c.contractAddress as Address, + functions: c.filterFunctions, + })); + if (transactionReceiptFilters.length > 0) { + await ProcessTransactionReceiptsQueue.add({ + chainId, + fromBlock, + toBlock, + filters: transactionReceiptFilters, + }); + } - return chainIndexerTask; + // Update the latest block number. + try { + await upsertChainIndexer({ + pgtx, + chainId, + currentBlockNumber: toBlock, + }); + } catch (error) { + logger({ + service: "worker", + level: "error", + message: `Updating latest block number on chain ${chainId}`, + error, + }); + } + }, + { + timeout: 60 * 1000, + }, + ); }; diff --git a/src/worker/tasks/manageChainIndexers.ts b/src/worker/tasks/manageChainIndexers.ts index 869dc2dac..741562ee7 100644 --- a/src/worker/tasks/manageChainIndexers.ts +++ b/src/worker/tasks/manageChainIndexers.ts @@ -15,7 +15,7 @@ export const manageChainIndexers = async () => { } for (const chainId in INDEXER_REGISTRY) { - const chainIdNum = parseInt(chainId); + const chainIdNum = Number.parseInt(chainId); if (!chainIdsToIndex.includes(chainIdNum)) { await removeChainIndexer(chainIdNum); } diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index 02bc04097..83e0aedd4 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -1,20 +1,20 @@ -import { Prisma, Webhooks } from "@prisma/client"; -import { AbiEvent } from "abitype"; -import { Job, Processor, Worker } from "bullmq"; +import type { Prisma, Webhooks } from "@prisma/client"; +import type { AbiEvent } from "abitype"; +import { Worker, type Job, type Processor } from "bullmq"; import superjson from "superjson"; import { - Address, - Chain, - PreparedEvent, - ThirdwebContract, eth_getBlockByHash, getContract, getContractEvents, getRpcClient, prepareEvent, + type Address, + type Chain, + type Hex, + type PreparedEvent, + type ThirdwebContract, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import { Hash } from "viem"; import { bulkInsertContractEventLogs } from "../../db/contractEventLogs/createContractEventLogs"; import { getContractSubscriptionsByChainId } from "../../db/contractSubscriptions/getContractSubscriptions"; import { WebhooksEventTypes } from "../../schema/webhooks"; @@ -53,11 +53,11 @@ const handler: Processor = async (job: Job) => { if (insertedLogs.length === 0) { return; } + job.log(`Inserted ${insertedLogs.length} events.`); // Enqueue webhooks. - const webhooksByContractAddress = await getWebhooksByContractAddresses( - chainId, - ); + const webhooksByContractAddress = + await getWebhooksByContractAddresses(chainId); for (const eventLog of insertedLogs) { const webhooks = webhooksByContractAddress[eventLog.contractAddress] ?? []; for (const webhook of webhooks) { @@ -246,12 +246,12 @@ const formatDecodedLog = async (args: { * Gets the timestamps for a list of block hashes. Falls back to the current time. * @param chain * @param blockHashes - * @returns Record + * @returns Record */ const getBlockTimestamps = async ( chain: Chain, - blockHashes: Hash[], -): Promise> => { + blockHashes: Hex[], +): Promise> => { const now = new Date(); const dedupe = Array.from(new Set(blockHashes)); const rpcRequest = getRpcClient({ client: thirdwebClient, chain }); @@ -267,7 +267,7 @@ const getBlockTimestamps = async ( }), ); - const res: Record = {}; + const res: Record = {}; for (let i = 0; i < dedupe.length; i++) { res[dedupe[i]] = blocks[i]; } diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index b0e2d7013..326fcfc7c 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -53,6 +53,7 @@ const handler: Processor = async (job: Job) => { if (insertedReceipts.length === 0) { return; } + job.log(`Inserted ${insertedReceipts.length} events.`); // Enqueue webhooks. const webhooksByContractAddress = diff --git a/test/e2e/tests/utils/getBlockTime.test.ts b/test/e2e/tests/utils/getBlockTime.test.ts new file mode 100644 index 000000000..1e8124bcd --- /dev/null +++ b/test/e2e/tests/utils/getBlockTime.test.ts @@ -0,0 +1,11 @@ +import { describe, expect, test } from "bun:test"; +import { polygon } from "thirdweb/chains"; +import { getBlockTimeSeconds } from "../../../../src/utils/indexer/getBlockTime"; + +describe("getBlockTimeSeconds", () => { + test("Returns roughly 2 seconds for Polygon", async () => { + const result = await getBlockTimeSeconds(polygon.id, 100); + // May be off slightly due to not having subsecond granularity. + expect(Math.round(result)).toEqual(2); + }); +}); From ee9c4ee21aac2d97ba13336a5b50ef2d6b911a18 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Thu, 7 Nov 2024 10:37:22 +0800 Subject: [PATCH 02/44] chore: Show min amount needed if out of funds (#760) * chore: Show min amount needed if out of funds * dont retry if out of funds * wrap error * error * update custom message --- src/utils/error.ts | 35 ++------------- src/worker/queues/queues.ts | 2 +- src/worker/tasks/sendTransactionWorker.ts | 55 ++++++++++++++--------- 3 files changed, 40 insertions(+), 52 deletions(-) diff --git a/src/utils/error.ts b/src/utils/error.ts index 595c8c3a7..e67f3d46f 100644 --- a/src/utils/error.ts +++ b/src/utils/error.ts @@ -1,39 +1,12 @@ import { ethers } from "ethers"; -import { getChainMetadata } from "thirdweb/chains"; import { stringify } from "thirdweb/utils"; -import { getChain } from "./chain"; import { isEthersErrorCode } from "./ethers"; -import { doSimulateTransaction } from "./transaction/simulateQueuedTransaction"; -import type { AnyTransaction } from "./transaction/types"; -export const prettifyError = (error: unknown): string => { - if (error instanceof Error) { - return error.message; - } - return stringify(error); -}; - -export const prettifyTransactionError = async ( - transaction: AnyTransaction, - error: Error, -): Promise => { - if (!transaction.isUserOp) { - if (isInsufficientFundsError(error)) { - const chain = await getChain(transaction.chainId); - const metadata = await getChainMetadata(chain); - return `Insufficient ${metadata.nativeCurrency?.symbol} on ${metadata.name} in ${transaction.from}.`; - } +export const wrapError = (error: unknown, prefix: "RPC" | "Bundler") => + new Error(`[${prefix}] ${prettifyError(error)}`); - if (isEthersErrorCode(error, ethers.errors.UNPREDICTABLE_GAS_LIMIT)) { - const simulateError = await doSimulateTransaction(transaction); - if (simulateError) { - return simulateError; - } - } - } - - return error.message; -}; +export const prettifyError = (error: unknown): string => + error instanceof Error ? error.message : stringify(error); const _parseMessage = (error: unknown): string | null => { return error && typeof error === "object" && "message" in error diff --git a/src/worker/queues/queues.ts b/src/worker/queues/queues.ts index f0c1e8456..d22534c37 100644 --- a/src/worker/queues/queues.ts +++ b/src/worker/queues/queues.ts @@ -1,4 +1,4 @@ -import { Job, JobsOptions, Worker } from "bullmq"; +import type { Job, JobsOptions, Worker } from "bullmq"; import { env } from "../../utils/env"; import { logger } from "../../utils/logger"; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 08b4f570b..6b3d091c9 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -6,8 +6,10 @@ import { getContract, readContract, toSerializableTransaction, + toTokens, type Hex, } from "thirdweb"; +import { getChainMetadata } from "thirdweb/chains"; import { stringify } from "thirdweb/utils"; import type { Account } from "thirdweb/wallets"; import { @@ -32,10 +34,10 @@ import { getChain } from "../../utils/chain"; import { msSince } from "../../utils/date"; import { env } from "../../utils/env"; import { + isInsufficientFundsError, isNonceAlreadyUsedError, isReplacementGasFeeTooLow, - prettifyError, - prettifyTransactionError, + wrapError, } from "../../utils/error"; import { getChecksumAddress } from "../../utils/primitiveTypes"; import { recordMetrics } from "../../utils/prometheus"; @@ -243,16 +245,12 @@ const _sendUserOp = async ( // we don't want this behavior in the engine context waitForDeployment: false, })) as UserOperation; // TODO support entrypoint v0.7 accounts - } catch (e) { - const erroredTransaction: ErroredTransaction = { + } catch (error) { + return { ...queuedTransaction, status: "errored", - errorMessage: prettifyError(e), - }; - job.log( - `Failed to populate transaction: ${erroredTransaction.errorMessage}`, - ); - return erroredTransaction; + errorMessage: wrapError(error, "Bundler").message, + } satisfies ErroredTransaction; } job.log(`Populated userOp: ${stringify(signedUserOp)}`); @@ -325,15 +323,11 @@ const _sendTransaction = async ( }, }); } catch (e: unknown) { - const erroredTransaction: ErroredTransaction = { + return { ...queuedTransaction, status: "errored", - errorMessage: prettifyError(e), - }; - job.log( - `Failed to populate transaction: ${erroredTransaction.errorMessage}`, - ); - return erroredTransaction; + errorMessage: wrapError(e, "RPC").message, + } satisfies ErroredTransaction; } // Handle if `maxFeePerGas` is overridden. @@ -380,7 +374,28 @@ const _sendTransaction = async ( job.log(`Recycling nonce: ${nonce}`); await recycleNonce(chainId, from, nonce); } - throw error; + + // Do not retry errors that are expected to be rejected by RPC again. + if (isInsufficientFundsError(error)) { + const { name, nativeCurrency } = await getChainMetadata(chain); + const { gas, value = 0n } = populatedTransaction; + const gasPrice = + populatedTransaction.gasPrice ?? populatedTransaction.maxFeePerGas; + + const minGasTokens = gasPrice + ? toTokens(gas * gasPrice + value, 18) + : null; + const errorMessage = minGasTokens + ? `Insufficient funds in ${account.address} on ${name}. Transaction requires > ${minGasTokens} ${nativeCurrency.symbol}.` + : `Insufficient funds in ${account.address} on ${name}. Transaction requires more ${nativeCurrency.symbol}.`; + return { + ...queuedTransaction, + status: "errored", + errorMessage, + } satisfies ErroredTransaction; + } + + throw wrapError(error, "RPC"); } await addSentNonce(chainId, from, nonce); @@ -466,7 +481,7 @@ const _resendTransaction = async ( job.log("A pending transaction exists with >= gas fees. Do not resend."); return null; } - throw error; + throw wrapError(error, "RPC"); } return { @@ -572,7 +587,7 @@ export const initSendTransactionWorker = () => { const erroredTransaction: ErroredTransaction = { ...transaction, status: "errored", - errorMessage: await prettifyTransactionError(transaction, error), + errorMessage: error.message, }; job.log(`Transaction errored: ${stringify(erroredTransaction)}`); From 1ba738a705a4be9b4773ff23d8f80d60715a15fc Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Fri, 8 Nov 2024 07:40:57 +0800 Subject: [PATCH 03/44] fix: Handle undefined nonce in transaction status (#765) --- src/server/schemas/transaction/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/schemas/transaction/index.ts b/src/server/schemas/transaction/index.ts index 2a82f5262..0db9dae34 100644 --- a/src/server/schemas/transaction/index.ts +++ b/src/server/schemas/transaction/index.ts @@ -292,7 +292,10 @@ export const toTransactionSchema = ( toAddress: transaction.to ?? null, data: transaction.data ?? null, value: transaction.value.toString(), - nonce: "nonce" in transaction ? transaction.nonce : null, + nonce: + "nonce" in transaction && transaction.nonce !== undefined + ? transaction.nonce + : null, deployedContractAddress: transaction.deployedContractAddress ?? null, deployedContractType: transaction.deployedContractType ?? null, functionName: transaction.functionName ?? null, From 32961ab9cf8c8cd9a0a674664506fa3453813499 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Fri, 8 Nov 2024 12:52:18 +0800 Subject: [PATCH 04/44] chore: clean up nonce resync worker (#763) * chore: clean up nonce resync worker * update logging --- src/worker/tasks/nonceResyncWorker.ts | 98 ++++++++++----------------- 1 file changed, 35 insertions(+), 63 deletions(-) diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonceResyncWorker.ts index bfe838b24..9a0642250 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -8,6 +8,7 @@ import { } from "../../db/wallets/walletNonce"; import { getConfig } from "../../utils/cache/getConfig"; import { getChain } from "../../utils/chain"; +import { prettifyError } from "../../utils/error"; import { logger } from "../../utils/logger"; import { redis } from "../../utils/redis/redis"; import { thirdwebClient } from "../../utils/sdk"; @@ -40,78 +41,49 @@ export const initNonceResyncWorker = async () => { */ const handler: Processor = async (job: Job) => { const sentNoncesKeys = await redis.keys("nonce-sent*"); - job.log(`Found ${sentNoncesKeys.length} nonce-sent* keys`); + if (sentNoncesKeys.length === 0) { + job.log("No active wallets."); + return; + } for (const sentNonceKey of sentNoncesKeys) { - const { chainId, walletAddress } = splitSentNoncesKey(sentNonceKey); - - const rpcRequest = getRpcClient({ - client: thirdwebClient, - chain: await getChain(chainId), - }); + try { + const { chainId, walletAddress } = splitSentNoncesKey(sentNonceKey); - const [transactionCount, lastUsedNonceDb] = await Promise.all([ - eth_getTransactionCount(rpcRequest, { - address: walletAddress, - blockTag: "latest", - }), - inspectNonce(chainId, walletAddress), - ]); - - if (Number.isNaN(transactionCount)) { - job.log( - `Received invalid onchain transaction count for ${walletAddress}: ${transactionCount}`, - ); - logger({ - level: "error", - message: `[nonceResyncWorker] Received invalid onchain transaction count for ${walletAddress}: ${transactionCount}`, - service: "worker", + const rpcRequest = getRpcClient({ + client: thirdwebClient, + chain: await getChain(chainId), }); - continue; - } + const lastUsedNonceOnchain = + (await eth_getTransactionCount(rpcRequest, { + address: walletAddress, + blockTag: "latest", + })) - 1; + const lastUsedNonceDb = await inspectNonce(chainId, walletAddress); - const lastUsedNonceOnchain = transactionCount - 1; - - job.log( - `${walletAddress} last used onchain nonce: ${lastUsedNonceOnchain} and last used db nonce: ${lastUsedNonceDb}`, - ); - logger({ - level: "debug", - message: `[nonceResyncWorker] last used onchain nonce: ${transactionCount} and last used db nonce: ${lastUsedNonceDb}`, - service: "worker", - }); - - // If the last used nonce onchain is the same as or ahead of the last used nonce in the db, - // There is no need to resync the nonce. - if (lastUsedNonceOnchain >= lastUsedNonceDb) { - job.log(`No need to resync nonce for ${walletAddress}`); - logger({ - level: "debug", - message: `[nonceResyncWorker] No need to resync nonce for ${walletAddress}`, - service: "worker", - }); - continue; - } + // Recycle all nonces between (onchain nonce, db nonce] if they aren't in-flight ("sent nonce"). + const recycled: number[] = []; + for ( + let nonce = lastUsedNonceOnchain + 1; + nonce <= lastUsedNonceDb; + nonce++ + ) { + const exists = await isSentNonce(chainId, walletAddress, nonce); + if (!exists) { + await recycleNonce(chainId, walletAddress, nonce); + recycled.push(nonce); + } + } - // for each nonce between last used db nonce and last used onchain nonce - // check if nonce exists in nonce-sent set - // if it does not exist, recycle it - for ( - let _nonce = lastUsedNonceOnchain + 1; - _nonce < lastUsedNonceDb; - _nonce++ - ) { - const exists = await isSentNonce(chainId, walletAddress, _nonce); + const message = `wallet=${chainId}:${walletAddress} lastUsedNonceOnchain=${lastUsedNonceOnchain} lastUsedNonceDb=${lastUsedNonceDb}, recycled=${recycled.join(",")}`; + job.log(message); + logger({ level: "debug", service: "worker", message }); + } catch (error) { logger({ - level: "debug", - message: `[nonceResyncWorker] nonce ${_nonce} exists in nonce-sent set: ${exists}`, + level: "error", + message: `[nonceResyncWorker] ${prettifyError(error)}`, service: "worker", }); - - // If nonce does not exist in nonce-sent set, recycle it - if (!exists) { - await recycleNonce(chainId, walletAddress, _nonce); - } } } }; From a121730627545bdb64fe410133d82a1cae5383f8 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Fri, 8 Nov 2024 12:59:30 +0800 Subject: [PATCH 05/44] fix: retry-failed creates undefined nonce value (#766) * fix: retry-failed creates undefined nonce value * type import --- src/server/middleware/error.ts | 33 ++++++++++------- src/server/routes/transaction/retry-failed.ts | 3 +- src/worker/tasks/sendTransactionWorker.ts | 36 ++++++++++--------- 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/src/server/middleware/error.ts b/src/server/middleware/error.ts index 0287e3f50..1db10c075 100644 --- a/src/server/middleware/error.ts +++ b/src/server/middleware/error.ts @@ -53,7 +53,17 @@ const isZodError = (err: unknown): boolean => { export const withErrorHandler = async (server: FastifyInstance) => { server.setErrorHandler( - (error: Error | CustomError | ZodError, request, reply) => { + (error: string | Error | CustomError | ZodError, request, reply) => { + if (typeof error === "string") { + return reply.status(StatusCodes.INTERNAL_SERVER_ERROR).send({ + error: { + statusCode: 500, + code: "INTERNAL_SERVER_ERROR", + message: error || ReasonPhrases.INTERNAL_SERVER_ERROR, + }, + }); + } + // Ethers Error Codes if (parseEthersError(error)) { return reply.status(StatusCodes.BAD_REQUEST).send({ @@ -103,7 +113,7 @@ export const withErrorHandler = async (server: FastifyInstance) => { StatusCodes.INTERNAL_SERVER_ERROR; const message = error.message ?? ReasonPhrases.INTERNAL_SERVER_ERROR; - reply.status(statusCode).send({ + return reply.status(statusCode).send({ error: { code, message, @@ -111,17 +121,16 @@ export const withErrorHandler = async (server: FastifyInstance) => { stack: env.NODE_ENV !== "production" ? error.stack : undefined, }, }); - } else { - // Handle non-custom errors - reply.status(StatusCodes.INTERNAL_SERVER_ERROR).send({ - error: { - statusCode: 500, - code: "INTERNAL_SERVER_ERROR", - message: error.message || ReasonPhrases.INTERNAL_SERVER_ERROR, - stack: env.NODE_ENV !== "production" ? error.stack : undefined, - }, - }); } + + reply.status(StatusCodes.INTERNAL_SERVER_ERROR).send({ + error: { + statusCode: 500, + code: "INTERNAL_SERVER_ERROR", + message: error.message || ReasonPhrases.INTERNAL_SERVER_ERROR, + stack: env.NODE_ENV !== "production" ? error.stack : undefined, + }, + }); }, ); }; diff --git a/src/server/routes/transaction/retry-failed.ts b/src/server/routes/transaction/retry-failed.ts index 0cb6dd73c..0227f2ca3 100644 --- a/src/server/routes/transaction/retry-failed.ts +++ b/src/server/routes/transaction/retry-failed.ts @@ -69,10 +69,9 @@ export async function retryFailedTransaction(fastify: FastifyInstance) { ); } - // temp do not handle userop if (transaction.isUserOp) { throw createCustomError( - `Transaction cannot be retried because it is a userop`, + "Transaction cannot be retried because it is a userop", StatusCodes.BAD_REQUEST, "TRANSACTION_CANNOT_BE_RETRIED", ); diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 6b3d091c9..803de187b 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -78,17 +78,15 @@ const handler: Processor = async (job: Job) => { // For example, the developer retried all failed transactions during an RPC outage. // An errored queued transaction (resendCount = 0) is safe to retry: the transaction wasn't sent to RPC. if (transaction.status === "errored" && resendCount === 0) { + const { errorMessage, ...omitted } = transaction; transaction = { - ...{ - ...transaction, - nonce: undefined, - errorMessage: undefined, - gas: undefined, - gasPrice: undefined, - maxFeePerGas: undefined, - maxPriorityFeePerGas: undefined, - }, + ...omitted, status: "queued", + resendCount: 0, + queueId: transaction.queueId, + queuedAt: transaction.queuedAt, + value: transaction.value, + data: transaction.data, manuallyResentAt: new Date(), } satisfies QueuedTransaction; } @@ -246,11 +244,14 @@ const _sendUserOp = async ( waitForDeployment: false, })) as UserOperation; // TODO support entrypoint v0.7 accounts } catch (error) { - return { + const errorMessage = wrapError(error, "Bundler").message; + const erroredTransaction: ErroredTransaction = { ...queuedTransaction, status: "errored", - errorMessage: wrapError(error, "Bundler").message, - } satisfies ErroredTransaction; + errorMessage, + }; + job.log(`Failed to populate transaction: ${errorMessage}`); + return erroredTransaction; } job.log(`Populated userOp: ${stringify(signedUserOp)}`); @@ -322,12 +323,15 @@ const _sendTransaction = async ( maxPriorityFeePerGas: overrides?.maxPriorityFeePerGas, }, }); - } catch (e: unknown) { - return { + } catch (error: unknown) { + const errorMessage = wrapError(error, "RPC").message; + const erroredTransaction: ErroredTransaction = { ...queuedTransaction, status: "errored", - errorMessage: wrapError(e, "RPC").message, - } satisfies ErroredTransaction; + errorMessage, + }; + job.log(`Failed to populate transaction: ${errorMessage}`); + return erroredTransaction; } // Handle if `maxFeePerGas` is overridden. From 68b3ed1395a80b1060ec04f0e6254543d02955ca Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Sat, 9 Nov 2024 18:08:36 +0800 Subject: [PATCH 06/44] fix: return 400 error on invalid args passed to read endpoint (#767) --- src/server/routes/contract/read/read.ts | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/server/routes/contract/read/read.ts b/src/server/routes/contract/read/read.ts index 7c598379a..89b0e115d 100644 --- a/src/server/routes/contract/read/read.ts +++ b/src/server/routes/contract/read/read.ts @@ -2,6 +2,7 @@ import { Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; +import { prettifyError } from "../../../../utils/error"; import { createCustomError } from "../../../middleware/error"; import { readRequestQuerySchema, @@ -64,22 +65,16 @@ export async function readContract(fastify: FastifyInstance) { }); let returnData: unknown; - try { returnData = await contract.call(functionName, parsedArgs ?? []); } catch (e) { - if ( - e instanceof Error && - (e.message.includes("is not a function") || - e.message.includes("arguments, but")) - ) { - throw createCustomError( - e.message, - StatusCodes.BAD_REQUEST, - "BAD_REQUEST", - ); - } + throw createCustomError( + prettifyError(e), + StatusCodes.BAD_REQUEST, + "BAD_REQUEST", + ); } + returnData = bigNumberReplacer(returnData); reply.status(StatusCodes.OK).send({ From cb6a7c95b297e07eb17786144b4a0548818bee9f Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Sun, 10 Nov 2024 19:33:20 +0800 Subject: [PATCH 07/44] feat: add 'test webhook' route (#768) --- src/server/routes/index.ts | 2 + src/server/routes/webhooks/test.ts | 120 +++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 src/server/routes/webhooks/test.ts diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index 08c7be15d..9daf6b452 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -109,6 +109,7 @@ import { createWebhookRoute } from "./webhooks/create"; import { getWebhooksEventTypes } from "./webhooks/events"; import { getAllWebhooksData } from "./webhooks/getAll"; import { revokeWebhook } from "./webhooks/revoke"; +import { testWebhookRoute } from "./webhooks/test"; export const withRoutes = async (fastify: FastifyInstance) => { // Backend Wallets @@ -158,6 +159,7 @@ export const withRoutes = async (fastify: FastifyInstance) => { await fastify.register(createWebhookRoute); await fastify.register(revokeWebhook); await fastify.register(getWebhooksEventTypes); + await fastify.register(testWebhookRoute); // Permissions await fastify.register(getAllPermissions); diff --git a/src/server/routes/webhooks/test.ts b/src/server/routes/webhooks/test.ts new file mode 100644 index 000000000..68bc341c6 --- /dev/null +++ b/src/server/routes/webhooks/test.ts @@ -0,0 +1,120 @@ +import { Type, type Static } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; +import { StatusCodes } from "http-status-codes"; +import { getWebhook } from "../../../db/webhooks/getWebhook"; +import { sendWebhookRequest } from "../../../utils/webhook"; +import { createCustomError } from "../../middleware/error"; +import { NumberStringSchema } from "../../schemas/number"; +import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import type { TransactionSchema } from "../../schemas/transaction"; + +const paramsSchema = Type.Object({ + webhookId: NumberStringSchema, +}); + +const responseBodySchema = Type.Object({ + result: Type.Object({ + ok: Type.Boolean(), + status: Type.Number(), + body: Type.String(), + }), +}); + +export async function testWebhookRoute(fastify: FastifyInstance) { + fastify.route<{ + Params: Static; + Reply: Static; + }>({ + method: "POST", + url: "/webhooks/:webhookId/test", + schema: { + summary: "Test webhook", + description: "Send a test payload to a webhook.", + tags: ["Webhooks"], + operationId: "testWebhook", + params: paramsSchema, + response: { + ...standardResponseSchema, + [StatusCodes.OK]: responseBodySchema, + }, + }, + handler: async (req, res) => { + const { webhookId } = req.params; + + const webhook = await getWebhook(Number.parseInt(webhookId)); + if (!webhook) { + throw createCustomError( + "Webhook not found.", + StatusCodes.BAD_REQUEST, + "NOT_FOUND", + ); + } + + const webhookBody: Static = { + // Queue details + queueId: "1411246e-b1c8-4f5d-9a25-8c1f40b54e55", + status: "mined", + onchainStatus: "success", + queuedAt: "2023-09-29T22:01:31.031Z", + sentAt: "2023-09-29T22:01:41.580Z", + minedAt: "2023-09-29T22:01:44.000Z", + errorMessage: null, + cancelledAt: null, + retryCount: 0, + + // Onchain details + chainId: "80002", + fromAddress: "0x3ecdbf3b911d0e9052b64850693888b008e18373", + toAddress: "0x365b83d67d5539c6583b9c0266a548926bf216f4", + data: "0xa9059cbb0000000000000000000000003ecdbf3b911d0e9052b64850693888b008e183730000000000000000000000000000000000000000000000000000000000000064", + value: "0x00", + nonce: 1786, + gasLimit: "39580", + maxFeePerGas: "2063100466", + maxPriorityFeePerGas: "1875545856", + gasPrice: "1875545871", + transactionType: 2, + transactionHash: + "0xc3ffa42dd4734b017d483e1158a2e936c8a97dd1aa4e4ce11df80ac8e81d2c7e", + sentAtBlockNumber: 40660021, + blockNumber: 40660026, + + // User operation (account abstraction) details + signerAddress: null, + accountAddress: null, + accountFactoryAddress: null, + target: null, + sender: null, + initCode: null, + callData: null, + callGasLimit: null, + verificationGasLimit: null, + preVerificationGas: null, + paymasterAndData: null, + userOpHash: null, + accountSalt: null, + + // Off-chain details + functionName: "transfer", + functionArgs: "0x3ecdbf3b911d0e9052b64850693888b008e18373,100", + extension: "none", + deployedContractAddress: null, + deployedContractType: null, + + // Deprecated + retryGasValues: null, + retryMaxFeePerGas: null, + retryMaxPriorityFeePerGas: null, + effectiveGasPrice: null, + cumulativeGasUsed: null, + onChainTxStatus: 1, + }; + + const resp = await sendWebhookRequest(webhook, webhookBody); + + res.status(StatusCodes.OK).send({ + result: resp, + }); + }, + }); +} From dc528ab60aa4a63b30b132815751f0b4bc245ec7 Mon Sep 17 00:00:00 2001 From: Prithvish Baidya Date: Mon, 11 Nov 2024 00:02:11 +0530 Subject: [PATCH 08/44] refactor: Add missing route to OPENAPI_ROUTES (#769) --- src/server/middleware/open-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/middleware/open-api.ts b/src/server/middleware/open-api.ts index ab82c8ad4..2a4b53883 100644 --- a/src/server/middleware/open-api.ts +++ b/src/server/middleware/open-api.ts @@ -1,7 +1,7 @@ import swagger from "@fastify/swagger"; import type { FastifyInstance } from "fastify"; -export const OPENAPI_ROUTES = ["/json", "/openapi.json"]; +export const OPENAPI_ROUTES = ["/json", "/openapi.json", "/json/"]; export const withOpenApi = async (server: FastifyInstance) => { await server.register(swagger, { From 2f762dc05f7b5d60a7981a4c8c1e7c4512c8b6bd Mon Sep 17 00:00:00 2001 From: Prithvish Baidya Date: Mon, 11 Nov 2024 13:07:03 +0530 Subject: [PATCH 09/44] fix sbw sdk v4 (#770) * refactor: Add missing entrypointAddress parameter to getSmartWallet This commit adds the missing entrypointAddress parameter to the getSmartWallet function in the getSmartWallet.ts file. The entrypointAddress is now passed as an argument to the SmartWallet constructor. This change ensures that the entrypointAddress is correctly set when using the v4 SDK with smart backend wallets. * fix: Set accountFactoryAddress and entrypointAddress in getWallet This commit updates the getWallet function in the getWallet.ts file to set the accountFactoryAddress and entrypointAddress parameters when creating a smart wallet. The accountFactoryAddress and entrypointAddress are now retrieved from the walletDetails object and passed as arguments to the SmartWallet constructor. This change ensures that the accountFactoryAddress and entrypointAddress are correctly set when using the v4 SDK with smart backend wallets. * fix: Set accountFactoryAddress and entrypointAddress in insertTransaction This commit updates the insertTransaction function in the insertTransaction.ts file to set the accountFactoryAddress and entrypointAddress parameters when creating a smart wallet. The accountFactoryAddress and entrypointAddress are now retrieved from the walletDetails object and assigned to the queuedTransaction object. This change ensures that the accountFactoryAddress and entrypointAddress are correctly set when using the v4 SDK with smart backend wallets. * chore: Clean up smart-local-wallet.test.ts This commit removes unused imports and updates the chainId variable in the smart-local-wallet.test.ts file. The chainId is now retrieved from the chain object. This change improves the readability and maintainability of the code. * feat: Add smart-local-wallet-sdk-v4.test.ts This commit adds the smart-local-wallet-sdk-v4.test.ts file, which contains tests for creating a local smart backend wallet and sending SDK v4 transactions. The tests deploy an ERC20 token, mint tokens, and check the balance. This change improves the test coverage for the smart backend wallet functionality. --- src/server/utils/wallets/getSmartWallet.ts | 3 + src/utils/cache/getWallet.ts | 6 ++ src/utils/transaction/insertTransaction.ts | 3 + .../smart-local-wallet-sdk-v4.test.ts | 90 +++++++++++++++++++ .../smart-local-wallet.test.ts | 2 +- 5 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts diff --git a/src/server/utils/wallets/getSmartWallet.ts b/src/server/utils/wallets/getSmartWallet.ts index 5f05743e0..59ab4d885 100644 --- a/src/server/utils/wallets/getSmartWallet.ts +++ b/src/server/utils/wallets/getSmartWallet.ts @@ -8,6 +8,7 @@ interface GetSmartWalletParams { backendWallet: EVMWallet; accountAddress: string; factoryAddress?: string; + entrypointAddress?: string; } /** @@ -19,6 +20,7 @@ export const getSmartWallet = async ({ backendWallet, accountAddress, factoryAddress, + entrypointAddress, }: GetSmartWalletParams) => { let resolvedFactoryAddress: string | undefined = factoryAddress; @@ -51,6 +53,7 @@ export const getSmartWallet = async ({ const smartWallet = new SmartWallet({ chain: chainId, factoryAddress: resolvedFactoryAddress, + entryPointAddress: entrypointAddress, secretKey: env.THIRDWEB_API_SECRET_KEY, gasless: true, }); diff --git a/src/utils/cache/getWallet.ts b/src/utils/cache/getWallet.ts index db84a941a..6b078594b 100644 --- a/src/utils/cache/getWallet.ts +++ b/src/utils/cache/getWallet.ts @@ -110,6 +110,8 @@ export const getWallet = async ({ chainId, backendWallet: adminWallet, accountAddress: walletDetails.address, + factoryAddress: walletDetails.accountFactoryAddress ?? undefined, + entrypointAddress: walletDetails.entrypointAddress ?? undefined, }); return smartWallet as TWallet; @@ -141,6 +143,8 @@ export const getWallet = async ({ chainId, backendWallet: adminWallet, accountAddress: walletDetails.address, + factoryAddress: walletDetails.accountFactoryAddress ?? undefined, + entrypointAddress: walletDetails.entrypointAddress ?? undefined, }); return smartWallet as TWallet; @@ -158,6 +162,8 @@ export const getWallet = async ({ chainId, backendWallet: adminWallet, accountAddress: walletDetails.address, + factoryAddress: walletDetails.accountFactoryAddress ?? undefined, + entrypointAddress: walletDetails.entrypointAddress ?? undefined, }); return smartWallet as TWallet; diff --git a/src/utils/transaction/insertTransaction.ts b/src/utils/transaction/insertTransaction.ts index 32a24178b..fe79018fb 100644 --- a/src/utils/transaction/insertTransaction.ts +++ b/src/utils/transaction/insertTransaction.ts @@ -117,6 +117,7 @@ export const insertTransaction = async ( // when using v4 SDK with smart backend wallets, the following values are not set correctly: // entrypointAddress is not set + // accountFactoryAddress is not set if (walletDetails && isSmartBackendWallet(walletDetails)) { if ( !(await doesChainSupportService( @@ -134,6 +135,8 @@ export const insertTransaction = async ( queuedTransaction = { ...queuedTransaction, entrypointAddress: walletDetails.entrypointAddress ?? undefined, + accountFactoryAddress: + walletDetails.accountFactoryAddress ?? undefined, }; } } catch { diff --git a/test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts b/test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts new file mode 100644 index 000000000..8ce0191a3 --- /dev/null +++ b/test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts @@ -0,0 +1,90 @@ +import { describe, expect, test } from "bun:test"; +import { arbitrumSepolia } from "thirdweb/chains"; +import { pollTransactionStatus } from "../../utils/transactions"; +import { setup } from "../setup"; + +const chain = arbitrumSepolia; +const chainId = chain.id.toString(); + +describe("smart local wallet (test succesfull deploy with SDKv4)", () => { + let smartWalletAddress: string | undefined; + + const getSmartWalletAddress = () => { + if (!smartWalletAddress) { + throw new Error("Smart wallet address not set"); + } + return smartWalletAddress; + }; + + test("Create a local smart backend wallet", async () => { + const { engine } = await setup(); + + const res = await engine.backendWallet.create({ + type: "smart:local", + label: "test", + }); + + expect(res.result.status).toEqual("success"); + expect(res.result.type).toEqual("smart:local"); + expect(res.result.walletAddress).toBeDefined(); + + smartWalletAddress = res.result.walletAddress; + }); + + test("Send a SDK v4 Transaction (deploy ERC20)", async () => { + const { engine } = await setup(); + + const deployRes = await engine.deploy.deployToken( + chainId, + getSmartWalletAddress(), + { + contractMetadata: { + name: "Test", + symbol: "TST", + platform_fee_basis_points: 0, + platform_fee_recipient: getSmartWalletAddress(), + trusted_forwarders: [], + }, + }, + ); + + const { queueId: deployQueueId, deployedAddress } = deployRes.result; + + if (!deployedAddress || !deployQueueId) { + throw new Error("Deploy failed"); + } + + await pollTransactionStatus(engine, deployQueueId); + + const mintRes = await engine.erc20.mintTo( + chainId, + deployedAddress, + getSmartWalletAddress(), + { + amount: "1000", + toAddress: getSmartWalletAddress(), + }, + ); + + await pollTransactionStatus(engine, mintRes.result.queueId); + const status = await engine.transaction.status(mintRes.result.queueId); + expect(status.result.accountAddress).toEqual(getSmartWalletAddress()); + + const balance = await engine.erc20.balanceOf( + getSmartWalletAddress(), + chainId, + deployedAddress, + ); + + expect(Number(balance.result.displayValue)).toEqual(1000); + }); + + test("Delete local smart backend wallet", async () => { + const { engine } = await setup(); + + const res = await engine.backendWallet.removeBackendWallet( + getSmartWalletAddress(), + ); + expect(res.result.status).toEqual("success"); + }); +}); diff --git a/test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts b/test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts index 24fbedf2d..6ed97a1f6 100644 --- a/test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts +++ b/test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts @@ -6,7 +6,7 @@ import { pollTransactionStatus } from "../../utils/transactions"; import { setup } from "../setup"; const chain = arbitrumSepolia; -const chainId = arbitrumSepolia.id.toString(); +const chainId = chain.id.toString(); const message = "test"; describe("smart local wallet", () => { From 0b784dcc35644161581e7ba10ceb6d38c7ef158c Mon Sep 17 00:00:00 2001 From: Prithvish Baidya Date: Mon, 11 Nov 2024 14:11:01 +0530 Subject: [PATCH 10/44] refactor all int chainId to string (#762) * refactor all int chainId to string * send string chainId to primsa sql template tag * revert back to gt for cursor --- src/db/chainIndexers/getChainIndexer.ts | 5 +++-- src/db/chainIndexers/upsertChainIndexer.ts | 8 ++++---- .../contractEventLogs/deleteContractEventLogs.ts | 2 +- src/db/contractEventLogs/getContractEventLogs.ts | 16 +++++++++------- .../deleteContractTransactionReceipts.ts | 2 +- .../getContractTransactionReceipts.ts | 12 +++++++----- .../migration.sql | 16 ++++++++++++++++ src/prisma/schema.prisma | 6 +++--- .../contract/events/getContractEventLogs.ts | 6 +++--- .../contract/events/getEventLogsByTimestamp.ts | 2 +- .../transactions/getTransactionReceipts.ts | 2 +- .../getTransactionReceiptsByTimestamp.ts | 2 +- src/server/schemas/eventLog.ts | 2 +- src/server/schemas/transactionReceipt.ts | 2 +- src/worker/tasks/processEventLogsWorker.ts | 2 +- .../tasks/processTransactionReceiptsWorker.ts | 2 +- 16 files changed, 54 insertions(+), 33 deletions(-) create mode 100644 src/prisma/migrations/20241106225714_all_chain_ids_to_string/migration.sql diff --git a/src/db/chainIndexers/getChainIndexer.ts b/src/db/chainIndexers/getChainIndexer.ts index cfe1ada01..166c2f228 100644 --- a/src/db/chainIndexers/getChainIndexer.ts +++ b/src/db/chainIndexers/getChainIndexer.ts @@ -1,3 +1,4 @@ +import { Prisma } from "@prisma/client"; import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; @@ -14,7 +15,7 @@ export const getLastIndexedBlock = async ({ const indexedChain = await prisma.chainIndexers.findUnique({ where: { - chainId, + chainId: chainId.toString(), }, }); @@ -42,7 +43,7 @@ export const getBlockForIndexing = async ({ FROM "chain_indexers" WHERE - "chainId"=${chainId} + "chainId"=${Prisma.sql`${chainId.toString()}`} FOR UPDATE NOWAIT `; return lastIndexedBlock[0].lastIndexedBlock; diff --git a/src/db/chainIndexers/upsertChainIndexer.ts b/src/db/chainIndexers/upsertChainIndexer.ts index e04d23d78..123a2a464 100644 --- a/src/db/chainIndexers/upsertChainIndexer.ts +++ b/src/db/chainIndexers/upsertChainIndexer.ts @@ -1,4 +1,4 @@ -import { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface UpsertChainIndexerParams { @@ -15,14 +15,14 @@ export const upsertChainIndexer = async ({ const prisma = getPrismaWithPostgresTx(pgtx); return prisma.chainIndexers.upsert({ where: { - chainId, + chainId: chainId.toString(), }, update: { - chainId, + chainId: chainId.toString(), lastIndexedBlock: currentBlockNumber, }, create: { - chainId, + chainId: chainId.toString(), lastIndexedBlock: currentBlockNumber, }, }); diff --git a/src/db/contractEventLogs/deleteContractEventLogs.ts b/src/db/contractEventLogs/deleteContractEventLogs.ts index b103f9040..4a859d2b3 100644 --- a/src/db/contractEventLogs/deleteContractEventLogs.ts +++ b/src/db/contractEventLogs/deleteContractEventLogs.ts @@ -11,7 +11,7 @@ export const deleteContractEventLogs = async ({ }: DeleteContractEventLogsParams) => { return prisma.contractEventLogs.deleteMany({ where: { - chainId, + chainId: chainId.toString(), contractAddress, }, }); diff --git a/src/db/contractEventLogs/getContractEventLogs.ts b/src/db/contractEventLogs/getContractEventLogs.ts index 55d87224d..ab27bfade 100644 --- a/src/db/contractEventLogs/getContractEventLogs.ts +++ b/src/db/contractEventLogs/getContractEventLogs.ts @@ -18,7 +18,7 @@ export const getContractEventLogsByBlockAndTopics = async ({ topics, }: GetContractLogsParams) => { const whereClause = { - chainId, + chainId: chainId.toString(), contractAddress, blockNumber: { gte: fromBlock, @@ -118,7 +118,9 @@ export const getEventLogsByCursor = async ({ let cursorObj: z.infer | null = null; if (cursor) { const decodedCursor = base64.decode(cursor); - const parsedCursor = decodedCursor.split("-").map((val) => parseInt(val)); + const parsedCursor = decodedCursor + .split("-") + .map((val) => Number.parseInt(val)); const [createdAt, chainId, blockNumber, transactionIndex, logIndex] = parsedCursor; const validationResult = CursorSchema.safeParse({ @@ -148,22 +150,22 @@ export const getEventLogsByCursor = async ({ { createdAt: { gt: cursorObj.createdAt } }, { createdAt: { equals: cursorObj.createdAt }, - chainId: { gt: cursorObj.chainId }, + chainId: { gt: cursorObj.chainId.toString() }, }, { createdAt: { equals: cursorObj.createdAt }, - chainId: { equals: cursorObj.chainId }, + chainId: { equals: cursorObj.chainId.toString() }, blockNumber: { gt: cursorObj.blockNumber }, }, { createdAt: { equals: cursorObj.createdAt }, - chainId: { equals: cursorObj.chainId }, + chainId: { equals: cursorObj.chainId.toString() }, blockNumber: { equals: cursorObj.blockNumber }, transactionIndex: { gt: cursorObj.transactionIndex }, }, { createdAt: { equals: cursorObj.createdAt }, - chainId: { equals: cursorObj.chainId }, + chainId: { equals: cursorObj.chainId.toString() }, blockNumber: { equals: cursorObj.blockNumber }, transactionIndex: { equals: cursorObj.transactionIndex }, logIndex: { gt: cursorObj.logIndex }, @@ -234,7 +236,7 @@ export const getContractEventLogsIndexedBlockRange = async ({ }: GetContractEventLogsIndexedBlockRangeParams) => { const result = await prisma.contractEventLogs.aggregate({ where: { - chainId, + chainId: chainId.toString(), contractAddress, }, _min: { diff --git a/src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts b/src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts index c30df628a..c4c262aee 100644 --- a/src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts +++ b/src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts @@ -11,7 +11,7 @@ export const deleteContractTransactionReceipts = async ({ }: DeleteContractTransactionReceiptsParams) => { return prisma.contractTransactionReceipts.deleteMany({ where: { - chainId, + chainId: chainId.toString(), contractAddress, }, }); diff --git a/src/db/contractTransactionReceipts/getContractTransactionReceipts.ts b/src/db/contractTransactionReceipts/getContractTransactionReceipts.ts index 3d29703f4..a027085f7 100644 --- a/src/db/contractTransactionReceipts/getContractTransactionReceipts.ts +++ b/src/db/contractTransactionReceipts/getContractTransactionReceipts.ts @@ -16,7 +16,7 @@ export const getContractTransactionReceiptsByBlock = async ({ toBlock, }: GetContractTransactionReceiptsParams) => { const whereClause = { - chainId, + chainId: chainId.toString(), contractAddress, blockNumber: { gte: fromBlock, @@ -90,7 +90,9 @@ export const getTransactionReceiptsByCursor = async ({ let cursorObj: z.infer | null = null; if (cursor) { const decodedCursor = base64.decode(cursor); - const parsedCursor = decodedCursor.split("-").map((val) => parseInt(val)); + const parsedCursor = decodedCursor + .split("-") + .map((val) => Number.parseInt(val)); const [createdAt, chainId, blockNumber, transactionIndex] = parsedCursor; const validationResult = CursorSchema.safeParse({ createdAt, @@ -118,16 +120,16 @@ export const getTransactionReceiptsByCursor = async ({ { createdAt: { gt: cursorObj.createdAt } }, { createdAt: { equals: cursorObj.createdAt }, - chainId: { gt: cursorObj.chainId }, + chainId: { gt: cursorObj.chainId.toString() }, }, { createdAt: { equals: cursorObj.createdAt }, - chainId: { equals: cursorObj.chainId }, + chainId: { equals: cursorObj.chainId.toString() }, blockNumber: { gt: cursorObj.blockNumber }, }, { createdAt: { equals: cursorObj.createdAt }, - chainId: { equals: cursorObj.chainId }, + chainId: { equals: cursorObj.chainId.toString() }, blockNumber: { gt: cursorObj.blockNumber }, transactionIndex: { gt: cursorObj.transactionIndex }, }, diff --git a/src/prisma/migrations/20241106225714_all_chain_ids_to_string/migration.sql b/src/prisma/migrations/20241106225714_all_chain_ids_to_string/migration.sql new file mode 100644 index 000000000..c6604eb7a --- /dev/null +++ b/src/prisma/migrations/20241106225714_all_chain_ids_to_string/migration.sql @@ -0,0 +1,16 @@ +/* + Warnings: + + - The primary key for the `chain_indexers` table will be changed. If it partially fails, the table could be left without primary key constraint. + +*/ +-- AlterTable +ALTER TABLE "chain_indexers" DROP CONSTRAINT "chain_indexers_pkey", +ALTER COLUMN "chainId" SET DATA TYPE TEXT, +ADD CONSTRAINT "chain_indexers_pkey" PRIMARY KEY ("chainId"); + +-- AlterTable +ALTER TABLE "contract_event_logs" ALTER COLUMN "chainId" SET DATA TYPE TEXT; + +-- AlterTable +ALTER TABLE "contract_transaction_receipts" ALTER COLUMN "chainId" SET DATA TYPE TEXT; diff --git a/src/prisma/schema.prisma b/src/prisma/schema.prisma index 2ae38f162..2e04b2d8b 100644 --- a/src/prisma/schema.prisma +++ b/src/prisma/schema.prisma @@ -222,7 +222,7 @@ model ContractSubscriptions { } model ContractEventLogs { - chainId Int + chainId String blockNumber Int contractAddress String transactionHash String @@ -251,7 +251,7 @@ model ContractEventLogs { } model ContractTransactionReceipts { - chainId Int + chainId String blockNumber Int contractAddress String contractId String // ${chainId}:${contractAddress} @@ -280,7 +280,7 @@ model ContractTransactionReceipts { } model ChainIndexers { - chainId Int @id + chainId String @id lastIndexedBlock Int createdAt DateTime @default(now()) diff --git a/src/server/routes/contract/events/getContractEventLogs.ts b/src/server/routes/contract/events/getContractEventLogs.ts index fb7195e10..85e0a0c3c 100644 --- a/src/server/routes/contract/events/getContractEventLogs.ts +++ b/src/server/routes/contract/events/getContractEventLogs.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { Type, type Static } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContractEventLogsByBlockAndTopics } from "../../../../db/contractEventLogs/getContractEventLogs"; import { isContractSubscribed } from "../../../../db/contractSubscriptions/getContractSubscriptions"; @@ -152,7 +152,7 @@ export async function getContractEventLogs(fastify: FastifyInstance) { }); return { - chainId: log.chainId, + chainId: Number.parseInt(log.chainId), contractAddress: log.contractAddress, blockNumber: log.blockNumber, transactionHash: log.transactionHash, diff --git a/src/server/routes/contract/events/getEventLogsByTimestamp.ts b/src/server/routes/contract/events/getEventLogsByTimestamp.ts index 9834aba55..2cde46d21 100644 --- a/src/server/routes/contract/events/getEventLogsByTimestamp.ts +++ b/src/server/routes/contract/events/getEventLogsByTimestamp.ts @@ -101,7 +101,7 @@ export async function getEventLogs(fastify: FastifyInstance) { }); return { - chainId: log.chainId, + chainId: Number.parseInt(log.chainId), contractAddress: log.contractAddress, blockNumber: log.blockNumber, transactionHash: log.transactionHash, diff --git a/src/server/routes/contract/transactions/getTransactionReceipts.ts b/src/server/routes/contract/transactions/getTransactionReceipts.ts index 5ccdbe956..87b90a530 100644 --- a/src/server/routes/contract/transactions/getTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/getTransactionReceipts.ts @@ -120,7 +120,7 @@ export async function getContractTransactionReceipts(fastify: FastifyInstance) { const transactionReceipts = resultTransactionReceipts.map((txRcpt) => { return { - chainId: txRcpt.chainId, + chainId: Number.parseInt(txRcpt.chainId), blockNumber: txRcpt.blockNumber, contractAddress: txRcpt.contractAddress, transactionHash: txRcpt.transactionHash, diff --git a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts b/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts index ed402a032..2c76ec6da 100644 --- a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts +++ b/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts @@ -81,7 +81,7 @@ export async function getContractTransactionReceiptsByTimestamp( const transactionReceipts = resultTransactionReceipts.map((txRcpt) => { return { - chainId: txRcpt.chainId, + chainId: Number.parseInt(txRcpt.chainId), blockNumber: txRcpt.blockNumber, contractAddress: txRcpt.contractAddress, transactionHash: txRcpt.transactionHash, diff --git a/src/server/schemas/eventLog.ts b/src/server/schemas/eventLog.ts index a653ff0e2..bf3f6a9d8 100644 --- a/src/server/schemas/eventLog.ts +++ b/src/server/schemas/eventLog.ts @@ -27,7 +27,7 @@ export const toEventLogSchema = ( }); return { - chainId: log.chainId, + chainId: Number.parseInt(log.chainId), contractAddress: log.contractAddress, blockNumber: log.blockNumber, transactionHash: log.transactionHash, diff --git a/src/server/schemas/transactionReceipt.ts b/src/server/schemas/transactionReceipt.ts index d58510598..5d10a8e16 100644 --- a/src/server/schemas/transactionReceipt.ts +++ b/src/server/schemas/transactionReceipt.ts @@ -24,7 +24,7 @@ export const transactionReceiptSchema = Type.Object({ export const toTransactionReceiptSchema = ( transactionReceipt: ContractTransactionReceipts, ): Static => ({ - chainId: transactionReceipt.chainId, + chainId: Number.parseInt(transactionReceipt.chainId), blockNumber: transactionReceipt.blockNumber, contractAddress: transactionReceipt.contractAddress, transactionHash: transactionReceipt.transactionHash, diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index 83e0aedd4..b3ad7c5fa 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -173,7 +173,7 @@ const getLogs = async ({ return await Promise.all( allLogs.map( async (log): Promise => ({ - chainId, + chainId: chainId.toString(), blockNumber: Number(log.blockNumber), contractAddress: normalizeAddress(log.address), transactionHash: log.transactionHash, diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index 326fcfc7c..d8cdb23ae 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -178,7 +178,7 @@ const getFormattedTransactionReceipts = async ({ }); receipts.push({ - chainId, + chainId: chainId.toString(), blockNumber: Number(receipt.blockNumber), contractAddress: toAddress, contractId: getContractId(chainId, toAddress), From 4e9ea68d9d285c5098fda47b514f5ad62a99dfc8 Mon Sep 17 00:00:00 2001 From: Prithvish Baidya Date: Wed, 13 Nov 2024 10:58:03 +0530 Subject: [PATCH 11/44] add another error phrase for nonce too low (#771) --- src/utils/error.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/error.ts b/src/utils/error.ts index e67f3d46f..c7b619c7a 100644 --- a/src/utils/error.ts +++ b/src/utils/error.ts @@ -16,9 +16,14 @@ const _parseMessage = (error: unknown): string | null => { export const isNonceAlreadyUsedError = (error: unknown) => { const message = _parseMessage(error); + const errorPhrases = ["nonce too low", "already known"]; + if (message) { - return message.includes("nonce too low"); + return errorPhrases.some((phrase) => + message.toLowerCase().includes(phrase), + ); } + return isEthersErrorCode(error, ethers.errors.NONCE_EXPIRED); }; From 39f1fc26b5e65e20784374f5778d4539dca55bdf Mon Sep 17 00:00:00 2001 From: Prithvish Baidya Date: Tue, 19 Nov 2024 23:32:34 +0530 Subject: [PATCH 12/44] fix getWalletDetails to fallback awsKmsAccessKeyId instead of awsKmsKeyId (#776) --- src/db/wallets/getWalletDetails.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/wallets/getWalletDetails.ts b/src/db/wallets/getWalletDetails.ts index 92356b05e..fcc8db3f5 100644 --- a/src/db/wallets/getWalletDetails.ts +++ b/src/db/wallets/getWalletDetails.ts @@ -175,7 +175,7 @@ export const getWalletDetails = async ({ ? decrypt(walletDetails.awsKmsSecretAccessKey, env.ENCRYPTION_PASSWORD) : (config.walletConfiguration.aws?.awsSecretAccessKey ?? null); - walletDetails.awsKmsKeyId = + walletDetails.awsKmsAccessKeyId = walletDetails.awsKmsAccessKeyId ?? config.walletConfiguration.aws?.awsAccessKeyId ?? null; From d25788ef6552a433e1614cfb712b7d1ab9ee5ec8 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Mon, 25 Nov 2024 21:41:24 +0800 Subject: [PATCH 13/44] fix: return 400 if transaction logs not found (#780) --- src/server/routes/transaction/blockchain/getLogs.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/server/routes/transaction/blockchain/getLogs.ts b/src/server/routes/transaction/blockchain/getLogs.ts index f3a68da2e..26a185dab 100644 --- a/src/server/routes/transaction/blockchain/getLogs.ts +++ b/src/server/routes/transaction/blockchain/getLogs.ts @@ -12,6 +12,7 @@ import { type Hex, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; +import { TransactionReceipt } from "thirdweb/transaction"; import { TransactionDB } from "../../../../db/transactions/db"; import { getChain } from "../../../../utils/chain"; import { thirdwebClient } from "../../../../utils/sdk"; @@ -168,12 +169,14 @@ export async function getTransactionLogs(fastify: FastifyInstance) { } // Try to get the receipt. - const transactionReceipt = await eth_getTransactionReceipt(rpcRequest, { - hash, - }); - if (!transactionReceipt) { + let transactionReceipt: TransactionReceipt | undefined; + try { + transactionReceipt = await eth_getTransactionReceipt(rpcRequest, { + hash, + }); + } catch { throw createCustomError( - "Cannot get logs for a transaction that is not mined.", + "Unable to get transaction receipt. The transaction may not have been mined yet.", StatusCodes.BAD_REQUEST, "TRANSACTION_NOT_MINED", ); From 77da8a4ddde922cfaf2d054cda56c4b38b97838e Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 26 Nov 2024 18:15:51 +0800 Subject: [PATCH 14/44] feat: Add security headers in response (#779) * feat: Add security headers in response * change order * update cross-spawn package * fix import * wip * fix cors, remove basic auth * use const * small updates --- package.json | 6 +- src/server/index.ts | 24 +- src/server/middleware/adminRoutes.ts | 61 +-- src/server/middleware/auth.ts | 6 +- src/server/middleware/cors.ts | 95 +++++ src/server/middleware/cors/cors.ts | 366 ------------------ src/server/middleware/cors/index.ts | 16 - src/server/middleware/cors/vary.ts | 114 ------ src/server/middleware/engineMode.ts | 11 +- src/server/middleware/error.ts | 4 +- src/server/middleware/logs.ts | 14 +- .../middleware/{open-api.ts => openApi.ts} | 4 +- src/server/middleware/prometheus.ts | 13 +- src/server/middleware/rateLimit.ts | 8 +- src/server/middleware/securityHeaders.ts | 20 + src/server/middleware/websocket.ts | 14 +- src/server/routes/configuration/cors/set.ts | 4 +- src/server/routes/index.ts | 4 +- src/server/schemas/address.ts | 2 +- src/server/schemas/wallet/index.ts | 2 + src/tests/cors.test.ts | 25 -- src/tests/schema.test.ts | 5 +- src/utils/usage.ts | 6 +- test/e2e/tests/sign-transaction.test.ts | 18 +- yarn.lock | 61 +-- 25 files changed, 235 insertions(+), 668 deletions(-) create mode 100644 src/server/middleware/cors.ts delete mode 100644 src/server/middleware/cors/cors.ts delete mode 100644 src/server/middleware/cors/index.ts delete mode 100644 src/server/middleware/cors/vary.ts rename src/server/middleware/{open-api.ts => openApi.ts} (93%) create mode 100644 src/server/middleware/securityHeaders.ts delete mode 100644 src/tests/cors.test.ts diff --git a/package.json b/package.json index 6d156ac43..ffc1e895c 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "@cloud-cryptographic-wallet/cloud-kms-signer": "^0.1.2", "@cloud-cryptographic-wallet/signer": "^0.0.5", "@ethersproject/json-wallets": "^5.7.0", - "@fastify/basic-auth": "^5.1.1", "@fastify/swagger": "^8.9.0", "@fastify/type-provider-typebox": "^3.2.0", "@fastify/websocket": "^8.2.0", @@ -67,7 +66,6 @@ "pg": "^8.11.3", "prisma": "^5.14.0", "prom-client": "^15.1.3", - "prool": "^0.0.16", "superjson": "^2.2.1", "thirdweb": "5.61.3", "uuid": "^9.0.1", @@ -91,6 +89,7 @@ "eslint-config-prettier": "^8.7.0", "openapi-typescript-codegen": "^0.25.0", "prettier": "^2.8.7", + "prool": "^0.0.16", "typescript": "^5.1.3", "vitest": "^2.0.3" }, @@ -112,6 +111,7 @@ "elliptic": ">=6.6.0", "micromatch": ">=4.0.8", "secp256k1": ">=4.0.4", - "ws": ">=8.17.1" + "ws": ">=8.17.1", + "cross-spawn": ">=7.0.6" } } diff --git a/src/server/index.ts b/src/server/index.ts index 66d7f2e10..8686aa63c 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -3,6 +3,7 @@ import fastify, { type FastifyInstance } from "fastify"; import * as fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; +import { getConfig } from "../utils/cache/getConfig"; import { clearCacheCron } from "../utils/cron/clearCacheCron"; import { env } from "../utils/env"; import { logger } from "../utils/logger"; @@ -15,9 +16,10 @@ import { withCors } from "./middleware/cors"; import { withEnforceEngineMode } from "./middleware/engineMode"; import { withErrorHandler } from "./middleware/error"; import { withRequestLogs } from "./middleware/logs"; -import { withOpenApi } from "./middleware/open-api"; +import { withOpenApi } from "./middleware/openApi"; import { withPrometheus } from "./middleware/prometheus"; import { withRateLimit } from "./middleware/rateLimit"; +import { withSecurityHeaders } from "./middleware/securityHeaders"; import { withWebSocket } from "./middleware/websocket"; import { withRoutes } from "./routes"; import { writeOpenApiToFile } from "./utils/openapi"; @@ -69,19 +71,23 @@ export const initServer = async () => { ...(env.ENABLE_HTTPS ? httpsObject : {}), }).withTypeProvider(); - server.decorateRequest("corsPreflightEnabled", false); + const config = await getConfig(); - await withCors(server); - await withRequestLogs(server); - await withPrometheus(server); - await withErrorHandler(server); - await withEnforceEngineMode(server); - await withRateLimit(server); + // Configure middleware + withErrorHandler(server); + withRequestLogs(server); + withSecurityHeaders(server); + withCors(server, config); + withRateLimit(server); + withEnforceEngineMode(server); + withServerUsageReporting(server); + withPrometheus(server); + + // Register routes await withWebSocket(server); await withAuth(server); await withOpenApi(server); await withRoutes(server); - await withServerUsageReporting(server); await withAdminRoutes(server); await server.ready(); diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/adminRoutes.ts index 76719a137..1dac982df 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/adminRoutes.ts @@ -1,11 +1,10 @@ import { createBullBoard } from "@bull-board/api"; import { BullMQAdapter } from "@bull-board/api/bullMQAdapter"; import { FastifyAdapter } from "@bull-board/fastify"; -import fastifyBasicAuth from "@fastify/basic-auth"; import type { Queue } from "bullmq"; -import { timingSafeEqual } from "crypto"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; +import { timingSafeEqual } from "node:crypto"; import { env } from "../../utils/env"; import { CancelRecycledNoncesQueue } from "../../worker/queues/cancelRecycledNoncesQueue"; import { MigratePostgresTransactionsQueue } from "../../worker/queues/migratePostgresTransactionsQueue"; @@ -19,7 +18,9 @@ import { SendTransactionQueue } from "../../worker/queues/sendTransactionQueue"; import { SendWebhookQueue } from "../../worker/queues/sendWebhookQueue"; export const ADMIN_QUEUES_BASEPATH = "/admin/queues"; +const ADMIN_ROUTES_USERNAME = "admin"; const ADMIN_ROUTES_PASSWORD = env.THIRDWEB_API_SECRET_KEY; + // Add queues to monitor here. const QUEUES: Queue[] = [ SendWebhookQueue.q, @@ -35,21 +36,8 @@ const QUEUES: Queue[] = [ ]; export const withAdminRoutes = async (fastify: FastifyInstance) => { - // Configure basic auth. - await fastify.register(fastifyBasicAuth, { - validate: (username, password, req, reply, done) => { - if (assertAdminBasicAuth(username, password)) { - done(); - return; - } - done(new Error("Unauthorized")); - }, - authenticate: true, - }); - - // Set up routes after Fastify is set up. fastify.after(async () => { - // Register bullboard UI. + // Create a new route for Bullboard routes. const serverAdapter = new FastifyAdapter(); serverAdapter.setBasePath(ADMIN_QUEUES_BASEPATH); @@ -57,35 +45,50 @@ export const withAdminRoutes = async (fastify: FastifyInstance) => { queues: QUEUES.map((q) => new BullMQAdapter(q)), serverAdapter, }); + await fastify.register(serverAdapter.registerPlugin(), { basePath: ADMIN_QUEUES_BASEPATH, prefix: ADMIN_QUEUES_BASEPATH, }); - // Apply basic auth only to admin routes. - fastify.addHook("onRequest", (req, reply, done) => { + fastify.addHook("onRequest", async (req, reply) => { if (req.url.startsWith(ADMIN_QUEUES_BASEPATH)) { - fastify.basicAuth(req, reply, (error) => { - if (error) { - reply - .status(StatusCodes.UNAUTHORIZED) - .send({ error: "Unauthorized" }); - return done(error); - } - }); + const authHeader = req.headers.authorization; + + if (!authHeader || !authHeader.startsWith("Basic ")) { + reply + .status(StatusCodes.UNAUTHORIZED) + .header("WWW-Authenticate", 'Basic realm="Admin Routes"') + .send({ error: "Unauthorized" }); + return; + } + + // Parse the basic auth credentials (`Basic `). + const base64Credentials = authHeader.split(" ")[1]; + const credentials = Buffer.from(base64Credentials, "base64").toString( + "utf8", + ); + const [username, password] = credentials.split(":"); + + if (!assertAdminBasicAuth(username, password)) { + reply + .status(StatusCodes.UNAUTHORIZED) + .header("WWW-Authenticate", 'Basic realm="Admin Routes"') + .send({ error: "Unauthorized" }); + return; + } } - done(); }); }); }; const assertAdminBasicAuth = (username: string, password: string) => { - if (username === "admin") { + if (username === ADMIN_ROUTES_USERNAME) { try { const buf1 = Buffer.from(password.padEnd(100)); const buf2 = Buffer.from(ADMIN_ROUTES_PASSWORD.padEnd(100)); return timingSafeEqual(buf1, buf2); - } catch (e) {} + } catch {} } return false; }; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 539d36b12..19883aa98 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -25,7 +25,7 @@ import { logger } from "../../utils/logger"; import { sendWebhookRequest } from "../../utils/webhook"; import { Permission } from "../schemas/auth"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; -import { OPENAPI_ROUTES } from "./open-api"; +import { OPENAPI_ROUTES } from "./openApi"; export type TAuthData = never; export type TAuthSession = { permissions: string }; @@ -43,7 +43,7 @@ declare module "fastify" { } } -export const withAuth = async (server: FastifyInstance) => { +export async function withAuth(server: FastifyInstance) { const config = await getConfig(); // Configure the ThirdwebAuth fastify plugin @@ -140,7 +140,7 @@ export const withAuth = async (server: FastifyInstance) => { message, }); }); -}; +} export const onRequest = async ({ req, diff --git a/src/server/middleware/cors.ts b/src/server/middleware/cors.ts new file mode 100644 index 000000000..be1e6eca6 --- /dev/null +++ b/src/server/middleware/cors.ts @@ -0,0 +1,95 @@ +import type { FastifyInstance } from "fastify"; +import type { ParsedConfig } from "../../schema/config"; +import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; + +const STANDARD_METHODS = "GET,POST,DELETE,PUT,PATCH,HEAD,PUT,PATCH,POST,DELETE"; +const DEFAULT_ALLOWED_HEADERS = [ + "Authorization", + "Content-Type", + "ngrok-skip-browser-warning", +]; + +export function withCors(server: FastifyInstance, config: ParsedConfig) { + server.addHook("onRequest", async (request, reply) => { + const origin = request.headers.origin; + + // Allow backend calls (no origin header). + if (!origin) { + return; + } + + // Allow admin routes to be accessed from the same host. + if (request.url.startsWith(ADMIN_QUEUES_BASEPATH)) { + const host = request.headers.host; + const originHost = new URL(origin).host; + if (originHost !== host) { + reply.code(403).send({ error: "Invalid origin" }); + return; + } + return; + } + + const allowedOrigins = config.accessControlAllowOrigin + .split(",") + .map(sanitizeOrigin); + + // Always set `Vary: Origin` to prevent caching issues even on invalid origins. + reply.header("Vary", "Origin"); + + if (isAllowedOrigin(origin, allowedOrigins)) { + // Set CORS headers if valid origin. + reply.header("Access-Control-Allow-Origin", origin); + reply.header("Access-Control-Allow-Methods", STANDARD_METHODS); + + // Handle preflight requests + if (request.method === "OPTIONS") { + const requestedHeaders = + request.headers["access-control-request-headers"]; + reply.header( + "Access-Control-Allow-Headers", + requestedHeaders ?? DEFAULT_ALLOWED_HEADERS.join(","), + ); + + reply.header("Cache-Control", "public, max-age=3600"); + reply.header("Access-Control-Max-Age", "3600"); + reply.code(204).send(); + return; + } + } else { + reply.code(403).send({ error: "Invalid origin" }); + return; + } + }); +} + +function isAllowedOrigin(origin: string, allowedOrigins: string[]) { + return ( + allowedOrigins + // Check if the origin matches any allowed origins. + .some((allowed) => { + if (allowed === "https://thirdweb-preview.com") { + return /^https?:\/\/.*\.thirdweb-preview\.com$/.test(origin); + } + if (allowed === "https://thirdweb-dev.com") { + return /^https?:\/\/.*\.thirdweb-dev\.com$/.test(origin); + } + + // Allow wildcards in the origin. For example "foo.example.com" matches "*.example.com" + if (allowed.includes("*")) { + const wildcardPattern = allowed.replace(/\*/g, ".*"); + const regex = new RegExp(`^${wildcardPattern}$`); + return regex.test(origin); + } + + // Otherwise check for an exact match. + return origin === allowed; + }) + ); +} + +function sanitizeOrigin(origin: string) { + if (origin.endsWith("/")) { + return origin.slice(0, -1); + } + return origin; +} diff --git a/src/server/middleware/cors/cors.ts b/src/server/middleware/cors/cors.ts deleted file mode 100644 index e56238642..000000000 --- a/src/server/middleware/cors/cors.ts +++ /dev/null @@ -1,366 +0,0 @@ -import { - FastifyInstance, - FastifyReply, - FastifyRequest, - HookHandlerDoneFunction, -} from "fastify"; -import { getConfig } from "../../../utils/cache/getConfig"; -import { - addAccessControlRequestHeadersToVaryHeader, - addOriginToVaryHeader, -} from "./vary"; - -declare module "fastify" { - interface FastifyRequest { - corsPreflightEnabled: boolean; - } -} - -interface ArrayOfValueOrArray extends Array> {} - -type OriginCallback = ( - err: Error | null, - origin: ValueOrArray, -) => void; -type OriginType = string | boolean | RegExp; -type ValueOrArray = T | ArrayOfValueOrArray; -type OriginFunction = ( - origin: string | undefined, - callback: OriginCallback, -) => void; - -interface FastifyCorsOptions { - /** - * Configures the Access-Control-Allow-Origin CORS header. - */ - origin?: ValueOrArray | OriginFunction; - /** - * Configures the Access-Control-Allow-Credentials CORS header. - * Set to true to pass the header, otherwise it is omitted. - */ - credentials?: boolean; - /** - * Configures the Access-Control-Expose-Headers CORS header. - * Expects a comma-delimited string (ex: 'Content-Range,X-Content-Range') - * or an array (ex: ['Content-Range', 'X-Content-Range']). - * If not specified, no custom headers are exposed. - */ - exposedHeaders?: string | string[]; - /** - * Configures the Access-Control-Allow-Headers CORS header. - * Expects a comma-delimited string (ex: 'Content-Type,Authorization') - * or an array (ex: ['Content-Type', 'Authorization']). If not - * specified, defaults to reflecting the headers specified in the - * request's Access-Control-Request-Headers header. - */ - allowedHeaders?: string | string[]; - /** - * Configures the Access-Control-Allow-Methods CORS header. - * Expects a comma-delimited string (ex: 'GET,PUT,POST') or an array (ex: ['GET', 'PUT', 'POST']). - */ - methods?: string | string[]; - /** - * Configures the Access-Control-Max-Age CORS header. - * Set to an integer to pass the header, otherwise it is omitted. - */ - maxAge?: number; - /** - * Configures the Cache-Control header for CORS preflight responses. - * Set to an integer to pass the header as `Cache-Control: max-age=${cacheControl}`, - * or set to a string to pass the header as `Cache-Control: ${cacheControl}` (fully define - * the header value), otherwise the header is omitted. - */ - cacheControl?: number | string | null; - /** - * Pass the CORS preflight response to the route handler (default: false). - */ - preflightContinue?: boolean; - /** - * Provides a status code to use for successful OPTIONS requests, - * since some legacy browsers (IE11, various SmartTVs) choke on 204. - */ - optionsSuccessStatus?: number; - /** - * Pass the CORS preflight response to the route handler (default: false). - */ - preflight?: boolean; - /** - * Enforces strict requirement of the CORS preflight request headers (Access-Control-Request-Method and Origin). - * Preflight requests without the required headers will result in 400 errors when set to `true` (default: `true`). - */ - strictPreflight?: boolean; - /** - * Hide options route from the documentation built using fastify-swagger (default: true). - */ - hideOptionsRoute?: boolean; -} - -const defaultOptions = { - origin: "*", - methods: "GET,HEAD,PUT,PATCH,POST,DELETE", - preflightContinue: false, - optionsSuccessStatus: 204, - credentials: false, - exposedHeaders: undefined, - allowedHeaders: undefined, - maxAge: undefined, - preflight: true, - strictPreflight: true, -}; - -export const sanitizeOrigin = (data: string): string | RegExp => { - if (data.startsWith("/") && data.endsWith("/")) { - return new RegExp(data.slice(1, -1)); - } - - if (data.startsWith("*.")) { - const regex = data.replace("*.", ".*."); - return new RegExp(regex); - } - - if (data.includes("thirdweb-preview.com")) { - return new RegExp(/^https?:\/\/.*\.thirdweb-preview\.com$/); - } - if (data.includes("thirdweb-dev.com")) { - return new RegExp(/^https?:\/\/.*\.thirdweb-dev\.com$/); - } - - // Remove trailing slashes. - // The origin header does not include a trailing slash. - if (data.endsWith("/")) { - return data.slice(0, -1); - } - - return data; -}; - -export const fastifyCors = async ( - fastify: FastifyInstance, - req: FastifyRequest, - reply: FastifyReply, - opts: FastifyCorsOptions, - next: HookHandlerDoneFunction, -) => { - const config = await getConfig(); - - const corsListConfig = config.accessControlAllowOrigin.split(","); - /** - * @deprecated - * Future versions will remove this env var. - */ - const corsListEnv = process.env.ACCESS_CONTROL_ALLOW_ORIGIN?.split(",") ?? []; - const originArray = [...corsListConfig, ...corsListEnv]; - - opts.origin = originArray.map(sanitizeOrigin); - - let hideOptionsRoute = true; - if (opts.hideOptionsRoute !== undefined) { - hideOptionsRoute = opts.hideOptionsRoute; - } - const corsOptions = normalizeCorsOptions(opts); - addCorsHeadersHandler(fastify, corsOptions, req, reply, next); - - next(); -}; - -const normalizeCorsOptions = (opts: FastifyCorsOptions): FastifyCorsOptions => { - const corsOptions = { ...defaultOptions, ...opts }; - if (Array.isArray(opts.origin) && opts.origin.indexOf("*") !== -1) { - corsOptions.origin = "*"; - } - if (Number.isInteger(corsOptions.cacheControl)) { - // integer numbers are formatted this way - corsOptions.cacheControl = `max-age=${corsOptions.cacheControl}`; - } else if (typeof corsOptions.cacheControl !== "string") { - // strings are applied directly and any other value is ignored - corsOptions.cacheControl = undefined; - } - return corsOptions; -}; - -const addCorsHeadersHandler = ( - fastify: FastifyInstance, - options: FastifyCorsOptions, - req: FastifyRequest, - reply: FastifyReply, - next: HookHandlerDoneFunction, -) => { - // Always set Vary header - // https://github.com/rs/cors/issues/10 - addOriginToVaryHeader(reply); - - const resolveOriginOption = - typeof options.origin === "function" - ? resolveOriginWrapper(fastify, options.origin) - : (_: any, cb: any) => cb(null, options.origin); - - resolveOriginOption( - req, - (error: Error | null, resolvedOriginOption: boolean) => { - if (error !== null) { - return next(error); - } - - // Disable CORS and preflight if false - if (resolvedOriginOption === false) { - return next(); - } - - // Falsy values are invalid - if (!resolvedOriginOption) { - return next(new Error("Invalid CORS origin option")); - } - - addCorsHeaders(req, reply, resolvedOriginOption, options); - - if (req.raw.method === "OPTIONS" && options.preflight === true) { - // Strict mode enforces the required headers for preflight - if ( - options.strictPreflight === true && - (!req.headers.origin || !req.headers["access-control-request-method"]) - ) { - reply - .status(400) - .type("text/plain") - .send("Invalid Preflight Request"); - return; - } - - req.corsPreflightEnabled = true; - - addPreflightHeaders(req, reply, options); - - if (!options.preflightContinue) { - // Do not call the hook callback and terminate the request - // Safari (and potentially other browsers) need content-length 0, - // for 204 or they just hang waiting for a body - reply - .code(options.optionsSuccessStatus!) - .header("Content-Length", "0") - .send(); - return; - } - } - - return; - }, - ); -}; - -const addCorsHeaders = ( - req: FastifyRequest, - reply: FastifyReply, - originOption: any, - corsOptions: FastifyCorsOptions, -) => { - const origin = getAccessControlAllowOriginHeader( - req.headers.origin!, - originOption, - ); - - // In the case of origin not allowed the header is not - // written in the response. - // https://github.com/fastify/fastify-cors/issues/127 - if (origin) { - reply.header("Access-Control-Allow-Origin", origin); - } - - if (corsOptions.credentials) { - reply.header("Access-Control-Allow-Credentials", "true"); - } - - if (corsOptions.exposedHeaders !== null) { - reply.header( - "Access-Control-Expose-Headers", - Array.isArray(corsOptions.exposedHeaders) - ? corsOptions.exposedHeaders.join(", ") - : corsOptions.exposedHeaders, - ); - } -}; - -function addPreflightHeaders( - req: FastifyRequest, - reply: FastifyReply, - corsOptions: FastifyCorsOptions, -) { - reply.header( - "Access-Control-Allow-Methods", - Array.isArray(corsOptions.methods) - ? corsOptions.methods.join(", ") - : corsOptions.methods, - ); - - if (!corsOptions.allowedHeaders) { - addAccessControlRequestHeadersToVaryHeader(reply); - const reqAllowedHeaders = req.headers["access-control-request-headers"]; - if (reqAllowedHeaders !== undefined) { - reply.header("Access-Control-Allow-Headers", reqAllowedHeaders); - } - } else { - reply.header( - "Access-Control-Allow-Headers", - Array.isArray(corsOptions.allowedHeaders) - ? corsOptions.allowedHeaders.join(", ") - : corsOptions.allowedHeaders, - ); - } - - if (corsOptions.maxAge !== null) { - reply.header("Access-Control-Max-Age", String(corsOptions.maxAge)); - } - - if (corsOptions.cacheControl) { - reply.header("Cache-Control", corsOptions.cacheControl); - } -} - -const resolveOriginWrapper = (fastify: FastifyInstance, origin: any) => { - return (req: FastifyRequest, cb: any) => { - const result = origin.call(fastify, req.headers.origin, cb); - - // Allow for promises - if (result && typeof result.then === "function") { - result.then((res: any) => cb(null, res), cb); - } - }; -}; - -const getAccessControlAllowOriginHeader = ( - reqOrigin: string | undefined, - originOption: string, -) => { - if (originOption === "*") { - // allow any origin - return "*"; - } - - if (typeof originOption === "string") { - // fixed origin - return originOption; - } - - // reflect origin - return isRequestOriginAllowed(reqOrigin, originOption) ? reqOrigin : false; -}; - -const isRequestOriginAllowed = ( - reqOrigin: string | undefined, - allowedOrigin: string | RegExp, -) => { - if (Array.isArray(allowedOrigin)) { - for (let i = 0; i < allowedOrigin.length; ++i) { - if (isRequestOriginAllowed(reqOrigin, allowedOrigin[i])) { - return true; - } - } - return false; - } else if (typeof allowedOrigin === "string") { - return reqOrigin === allowedOrigin; - } else if (allowedOrigin instanceof RegExp && reqOrigin) { - allowedOrigin.lastIndex = 0; - return allowedOrigin.test(reqOrigin); - } else { - return !!allowedOrigin; - } -}; diff --git a/src/server/middleware/cors/index.ts b/src/server/middleware/cors/index.ts deleted file mode 100644 index e964945d9..000000000 --- a/src/server/middleware/cors/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { FastifyInstance } from "fastify"; -import { fastifyCors } from "./cors"; - -export const withCors = async (server: FastifyInstance) => { - server.addHook("onRequest", (request, reply, next) => { - fastifyCors( - server, - request, - reply, - { - credentials: true, - }, - next, - ); - }); -}; diff --git a/src/server/middleware/cors/vary.ts b/src/server/middleware/cors/vary.ts deleted file mode 100644 index 2a4423138..000000000 --- a/src/server/middleware/cors/vary.ts +++ /dev/null @@ -1,114 +0,0 @@ -import type { FastifyReply } from "fastify"; -import LRUCache from "mnemonist/lru-cache"; - -/** - * Field Value Components - * Most HTTP header field values are defined using common syntax - * components (token, quoted-string, and comment) separated by - * whitespace or specific delimiting characters. Delimiters are chosen - * from the set of US-ASCII visual characters not allowed in a token - * (DQUOTE and "(),/:;<=>?@[\]{}"). - * - * field-name = token - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" - * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" - * / DIGIT / ALPHA - * ; any VCHAR, except delimiters - * - * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6 - */ - -const validFieldnameRE = /^[!#$%&'*+\-.^\w`|~]+$/u; -function validateFieldname(fieldname: string) { - if (validFieldnameRE.test(fieldname) === false) { - throw new TypeError("Fieldname contains invalid characters."); - } -} - -export const parse = (header: string) => { - header = header.trim().toLowerCase(); - const result = []; - - if (header.length === 0) { - // pass through - } else if (header.indexOf(",") === -1) { - result.push(header); - } else { - const il = header.length; - let i = 0; - let pos = 0; - let char; - - // tokenize the header - for (i = 0; i < il; ++i) { - char = header[i]; - // when we have whitespace set the pos to the next position - if (char === " ") { - pos = i + 1; - // `,` is the separator of vary-values - } else if (char === ",") { - // if pos and current position are not the same we have a valid token - if (pos !== i) { - result.push(header.slice(pos, i)); - } - // reset the positions - pos = i + 1; - } - } - - if (pos !== i) { - result.push(header.slice(pos, i)); - } - } - - return result; -}; - -function createAddFieldnameToVary(fieldname: string) { - const headerCache = new LRUCache(1000); - - validateFieldname(fieldname); - - return function (reply: FastifyReply) { - let header = reply.getHeader("Vary") as any; - - if (!header) { - reply.header("Vary", fieldname); - return; - } - - if (header === "*") { - return; - } - - if (fieldname === "*") { - reply.header("Vary", "*"); - return; - } - - if (Array.isArray(header)) { - header = header.join(", "); - } - - if (!headerCache.has(header)) { - const vals = parse(header); - - if (vals.indexOf("*") !== -1) { - headerCache.set(header, "*"); - } else if (vals.indexOf(fieldname.toLowerCase()) === -1) { - headerCache.set(header, header + ", " + fieldname); - } else { - headerCache.set(header, null); - } - } - const cached = headerCache.get(header); - if (cached !== null) { - reply.header("Vary", cached); - } - }; -} - -export const addOriginToVaryHeader = createAddFieldnameToVary("Origin"); -export const addAccessControlRequestHeadersToVaryHeader = - createAddFieldnameToVary("Access-Control-Request-Headers"); diff --git a/src/server/middleware/engineMode.ts b/src/server/middleware/engineMode.ts index 790cd1526..c111c5fdd 100644 --- a/src/server/middleware/engineMode.ts +++ b/src/server/middleware/engineMode.ts @@ -1,16 +1,17 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { env } from "../../utils/env"; -export const withEnforceEngineMode = async (server: FastifyInstance) => { +export function withEnforceEngineMode(server: FastifyInstance) { if (env.ENGINE_MODE === "sandbox") { server.addHook("onRequest", async (request, reply) => { if (request.method !== "GET") { return reply.status(405).send({ statusCode: 405, - error: "Read Only Mode. Method Not Allowed", - message: "Read Only Mode. Method Not Allowed", + error: "Engine is in read-only mode. Only GET requests are allowed.", + message: + "Engine is in read-only mode. Only GET requests are allowed.", }); } }); } -}; +} diff --git a/src/server/middleware/error.ts b/src/server/middleware/error.ts index 1db10c075..5b321cbfd 100644 --- a/src/server/middleware/error.ts +++ b/src/server/middleware/error.ts @@ -51,7 +51,7 @@ const isZodError = (err: unknown): boolean => { ); }; -export const withErrorHandler = async (server: FastifyInstance) => { +export function withErrorHandler(server: FastifyInstance) { server.setErrorHandler( (error: string | Error | CustomError | ZodError, request, reply) => { if (typeof error === "string") { @@ -133,4 +133,4 @@ export const withErrorHandler = async (server: FastifyInstance) => { }); }, ); -}; +} diff --git a/src/server/middleware/logs.ts b/src/server/middleware/logs.ts index 4c719547d..e5ed3a6b5 100644 --- a/src/server/middleware/logs.ts +++ b/src/server/middleware/logs.ts @@ -2,7 +2,7 @@ import type { FastifyInstance } from "fastify"; import { stringify } from "thirdweb/utils"; import { logger } from "../../utils/logger"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; -import { OPENAPI_ROUTES } from "./open-api"; +import { OPENAPI_ROUTES } from "./openApi"; const SKIP_LOG_PATHS = new Set([ "", @@ -16,16 +16,15 @@ const SKIP_LOG_PATHS = new Set([ "/configuration/wallets", ]); -export const withRequestLogs = async (server: FastifyInstance) => { - server.addHook("onSend", (request, reply, payload, done) => { +export function withRequestLogs(server: FastifyInstance) { + server.addHook("onSend", async (request, reply, payload) => { if ( request.method === "OPTIONS" || !request.routeOptions.url || SKIP_LOG_PATHS.has(request.routeOptions.url) || request.routeOptions.url.startsWith(ADMIN_QUEUES_BASEPATH) ) { - done(); - return; + return payload; } const { method, routeOptions, headers, params, query, body } = request; @@ -37,6 +36,7 @@ export const withRequestLogs = async (server: FastifyInstance) => { "x-idempotency-key": headers["x-idempotency-key"], "x-account-address": headers["x-account-address"], "x-account-factory-address": headers["x-account-factory-address"], + "x-account-salt": headers["x-account-salt"], }; const paramsStr = @@ -67,6 +67,6 @@ export const withRequestLogs = async (server: FastifyInstance) => { ].join(" "), }); - done(); + return payload; }); -}; +} diff --git a/src/server/middleware/open-api.ts b/src/server/middleware/openApi.ts similarity index 93% rename from src/server/middleware/open-api.ts rename to src/server/middleware/openApi.ts index 2a4b53883..6a995d221 100644 --- a/src/server/middleware/open-api.ts +++ b/src/server/middleware/openApi.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; export const OPENAPI_ROUTES = ["/json", "/openapi.json", "/json/"]; -export const withOpenApi = async (server: FastifyInstance) => { +export async function withOpenApi(server: FastifyInstance) { await server.register(swagger, { openapi: { info: { @@ -39,4 +39,4 @@ export const withOpenApi = async (server: FastifyInstance) => { res.send(server.swagger()); }); } -}; +} diff --git a/src/server/middleware/prometheus.ts b/src/server/middleware/prometheus.ts index 2b0faaf24..64bae9d49 100644 --- a/src/server/middleware/prometheus.ts +++ b/src/server/middleware/prometheus.ts @@ -1,21 +1,20 @@ -import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; +import type { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; import { env } from "../../utils/env"; import { recordMetrics } from "../../utils/prometheus"; -export const withPrometheus = async (server: FastifyInstance) => { +export function withPrometheus(server: FastifyInstance) { if (!env.METRICS_ENABLED) { return; } server.addHook( "onResponse", - (req: FastifyRequest, res: FastifyReply, done) => { + async (req: FastifyRequest, res: FastifyReply) => { const { method } = req; const url = req.routeOptions.url; const { statusCode } = res; - const duration = res.elapsedTime; // Use Fastify's built-in timing + const duration = res.elapsedTime; - // Record metrics recordMetrics({ event: "response_sent", params: { @@ -25,8 +24,6 @@ export const withPrometheus = async (server: FastifyInstance) => { method: method, }, }); - - done(); }, ); -}; +} diff --git a/src/server/middleware/rateLimit.ts b/src/server/middleware/rateLimit.ts index 5d87c9a11..97c3f72cd 100644 --- a/src/server/middleware/rateLimit.ts +++ b/src/server/middleware/rateLimit.ts @@ -3,12 +3,12 @@ import { StatusCodes } from "http-status-codes"; import { env } from "../../utils/env"; import { redis } from "../../utils/redis/redis"; import { createCustomError } from "./error"; -import { OPENAPI_ROUTES } from "./open-api"; +import { OPENAPI_ROUTES } from "./openApi"; const SKIP_RATELIMIT_PATHS = ["/", ...OPENAPI_ROUTES]; -export const withRateLimit = async (server: FastifyInstance) => { - server.addHook("onRequest", async (request, reply) => { +export function withRateLimit(server: FastifyInstance) { + server.addHook("onRequest", async (request, _reply) => { if (SKIP_RATELIMIT_PATHS.includes(request.url)) { return; } @@ -26,4 +26,4 @@ export const withRateLimit = async (server: FastifyInstance) => { ); } }); -}; +} diff --git a/src/server/middleware/securityHeaders.ts b/src/server/middleware/securityHeaders.ts new file mode 100644 index 000000000..5096d4811 --- /dev/null +++ b/src/server/middleware/securityHeaders.ts @@ -0,0 +1,20 @@ +import type { FastifyInstance } from "fastify"; + +export function withSecurityHeaders(server: FastifyInstance) { + server.addHook("onSend", async (_request, reply, payload) => { + reply.header( + "Strict-Transport-Security", + "max-age=31536000; includeSubDomains; preload", + ); + reply.header("Content-Security-Policy", "default-src 'self';"); + reply.header("X-Frame-Options", "DENY"); + reply.header("X-Content-Type-Options", "nosniff"); + reply.header("Referrer-Policy", "no-referrer"); + reply.header( + "Permissions-Policy", + "geolocation=(), camera=(), microphone=()", + ); + + return payload; + }); +} diff --git a/src/server/middleware/websocket.ts b/src/server/middleware/websocket.ts index 2f68cf2f2..6c7ebceef 100644 --- a/src/server/middleware/websocket.ts +++ b/src/server/middleware/websocket.ts @@ -1,15 +1,15 @@ import WebSocketPlugin from "@fastify/websocket"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { logger } from "../../utils/logger"; -export const withWebSocket = async (server: FastifyInstance) => { +export async function withWebSocket(server: FastifyInstance) { await server.register(WebSocketPlugin, { - errorHandler: function ( + errorHandler: ( error, conn /* SocketStream */, - req /* FastifyRequest */, - reply /* FastifyReply */, - ) { + _req /* FastifyRequest */, + _reply /* FastifyReply */, + ) => { logger({ service: "websocket", level: "error", @@ -20,4 +20,4 @@ export const withWebSocket = async (server: FastifyInstance) => { conn.destroy(error); }, }); -}; +} diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index 30a0c6946..54ddf3e84 100644 --- a/src/server/routes/configuration/cors/set.ts +++ b/src/server/routes/configuration/cors/set.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { Type, type Static } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index 9daf6b452..4345859ca 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -111,7 +111,7 @@ import { getAllWebhooksData } from "./webhooks/getAll"; import { revokeWebhook } from "./webhooks/revoke"; import { testWebhookRoute } from "./webhooks/test"; -export const withRoutes = async (fastify: FastifyInstance) => { +export async function withRoutes(fastify: FastifyInstance) { // Backend Wallets await fastify.register(createBackendWallet); await fastify.register(removeBackendWallet); @@ -267,4 +267,4 @@ export const withRoutes = async (fastify: FastifyInstance) => { // Admin await fastify.register(getTransactionDetails); await fastify.register(getNonceDetailsRoute); -}; +} diff --git a/src/server/schemas/address.ts b/src/server/schemas/address.ts index 8779391bc..c7006f999 100644 --- a/src/server/schemas/address.ts +++ b/src/server/schemas/address.ts @@ -12,7 +12,7 @@ import { Type } from "@sinclair/typebox"; */ export const AddressSchema = Type.RegExp(/^0x[a-fA-F0-9]{40}$/, { description: "A contract or wallet address", - examples: ["0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4"], + examples: ["0x000000000000000000000000000000000000dead"], }); export const TransactionHashSchema = Type.RegExp(/^0x[a-fA-F0-9]{64}$/, { diff --git a/src/server/schemas/wallet/index.ts b/src/server/schemas/wallet/index.ts index 4f5a87c9e..cd2c4d024 100644 --- a/src/server/schemas/wallet/index.ts +++ b/src/server/schemas/wallet/index.ts @@ -22,11 +22,13 @@ export const walletWithAAHeaderSchema = Type.Object({ "x-account-address": Type.Optional({ ...AddressSchema, description: "Smart account address", + examples: [], }), "x-account-factory-address": Type.Optional({ ...AddressSchema, description: "Smart account factory address. If omitted, Engine will try to resolve it from the contract.", + examples: [], }), "x-account-salt": Type.Optional( Type.String({ diff --git a/src/tests/cors.test.ts b/src/tests/cors.test.ts deleted file mode 100644 index 321709953..000000000 --- a/src/tests/cors.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { sanitizeOrigin } from "../server/middleware/cors/cors"; - -describe("sanitizeOrigin", () => { - it("with leading and trailing slashes", () => { - expect(sanitizeOrigin("/foobar/")).toEqual(RegExp("foobar")); - }); - it("with leading wildcard", () => { - expect(sanitizeOrigin("*.foobar.com")).toEqual(RegExp(".*.foobar.com")); - }); - it("with thirdweb domains", () => { - expect(sanitizeOrigin("https://thirdweb-preview.com")).toEqual( - new RegExp(/^https?:\/\/.*\.thirdweb-preview\.com$/), - ); - expect(sanitizeOrigin("https://thirdweb-dev.com")).toEqual( - new RegExp(/^https?:\/\/.*\.thirdweb-dev\.com$/), - ); - }); - it("with trailing slashes", () => { - expect(sanitizeOrigin("https://foobar.com/")).toEqual("https://foobar.com"); - }); - it("fallback: don't change origin", () => { - expect(sanitizeOrigin("https://foobar.com")).toEqual("https://foobar.com"); - }); -}); diff --git a/src/tests/schema.test.ts b/src/tests/schema.test.ts index 4255b2e95..17f4b167a 100644 --- a/src/tests/schema.test.ts +++ b/src/tests/schema.test.ts @@ -45,10 +45,7 @@ describe("chainIdOrSlugSchema", () => { describe("AddressSchema", () => { it("should validate valid addresses", () => { expect( - Value.Check(AddressSchema, "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4"), - ).toBe(true); - expect( - Value.Check(AddressSchema, "0x1234567890abcdef1234567890abcdef12345678"), + Value.Check(AddressSchema, "0x000000000000000000000000000000000000dead"), ).toBe(true); }); diff --git a/src/utils/usage.ts b/src/utils/usage.ts index 5d218b787..002c437c8 100644 --- a/src/utils/usage.ts +++ b/src/utils/usage.ts @@ -3,7 +3,7 @@ import { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; import { FastifyInstance } from "fastify"; import { Address, Hex } from "thirdweb"; import { ADMIN_QUEUES_BASEPATH } from "../server/middleware/adminRoutes"; -import { OPENAPI_ROUTES } from "../server/middleware/open-api"; +import { OPENAPI_ROUTES } from "../server/middleware/openApi"; import { contractParamSchema } from "../server/schemas/sharedApiSchemas"; import { walletWithAddressParamSchema } from "../server/schemas/wallet"; import { getChainIdFromChain } from "../server/utils/chain"; @@ -54,7 +54,7 @@ const SKIP_USAGE_PATHS = new Set([ ...OPENAPI_ROUTES, ]); -export const withServerUsageReporting = (server: FastifyInstance) => { +export function withServerUsageReporting(server: FastifyInstance) { // Skip reporting if CLIENT_ANALYTICS_URL is unset. if (env.CLIENT_ANALYTICS_URL === "") { return; @@ -98,7 +98,7 @@ export const withServerUsageReporting = (server: FastifyInstance) => { body: JSON.stringify(requestBody), }).catch(() => {}); // Catch uncaught exceptions since this fetch call is non-blocking. }); -}; +} export const reportUsage = (usageEvents: ReportUsageParams[]) => { // Skip reporting if CLIENT_ANALYTICS_URL is unset. diff --git a/test/e2e/tests/sign-transaction.test.ts b/test/e2e/tests/sign-transaction.test.ts index 16e04b7e4..7dabab5d7 100644 --- a/test/e2e/tests/sign-transaction.test.ts +++ b/test/e2e/tests/sign-transaction.test.ts @@ -9,7 +9,7 @@ describe("signTransaction route", () => { transaction: { type: 0, chainId: 1, - to: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + to: "0x000000000000000000000000000000000000dead", nonce: "42", gasLimit: "88000", gasPrice: "2000000000", @@ -29,7 +29,7 @@ describe("signTransaction route", () => { transaction: { type: 1, chainId: 137, - to: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + to: "0x000000000000000000000000000000000000dead", nonce: "42", gasLimit: "88000", maxFeePerGas: "2000000000", @@ -37,7 +37,7 @@ describe("signTransaction route", () => { value: "100000000000000000", accessList: [ { - address: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + address: "0x000000000000000000000000000000000000dead", storageKeys: [ "0x0000000000000000000000000000000000000000000000000000000000000001", ], @@ -58,13 +58,13 @@ describe("signTransaction route", () => { transaction: { type: 2, chainId: 137, - to: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + to: "0x000000000000000000000000000000000000dead", nonce: "42", gasLimit: "88000", value: "100000000000000000", accessList: [ { - address: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + address: "0x000000000000000000000000000000000000dead", storageKeys: [ "0x0000000000000000000000000000000000000000000000000000000000000001", ], @@ -85,7 +85,7 @@ describe("signTransaction route", () => { transaction: { type: 3, chainId: 137, - to: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + to: "0x000000000000000000000000000000000000dead", nonce: "42", gasLimit: "88000", maxFeePerGas: "2000000000", @@ -93,7 +93,7 @@ describe("signTransaction route", () => { value: "100000000000000000", accessList: [ { - address: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + address: "0x000000000000000000000000000000000000dead", storageKeys: [ "0x0000000000000000000000000000000000000000000000000000000000000001", ], @@ -114,7 +114,7 @@ describe("signTransaction route", () => { transaction: { type: 4, chainId: 137, - to: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + to: "0x000000000000000000000000000000000000dead", nonce: "42", gasLimit: "88000", maxFeePerGas: "2000000000", @@ -122,7 +122,7 @@ describe("signTransaction route", () => { value: "100000000000000000", accessList: [ { - address: "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + address: "0x000000000000000000000000000000000000dead", storageKeys: [ "0x0000000000000000000000000000000000000000000000000000000000000001", ], diff --git a/yarn.lock b/yarn.lock index 833d26027..1d724f715 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2330,14 +2330,6 @@ ajv-formats "^2.1.1" fast-uri "^2.0.0" -"@fastify/basic-auth@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@fastify/basic-auth/-/basic-auth-5.1.1.tgz#ff93d787bbbbd93b126550b797e1c416628c0a49" - integrity sha512-L4b7EK5LKZnV6fdH1+rQbjhkKGXjCfiKJ0JkdGHZQPBMHMiXDZF8xbZsCakWGf9c7jDXJicP3FPcIXUPBkuSeQ== - dependencies: - "@fastify/error" "^3.0.0" - fastify-plugin "^4.0.0" - "@fastify/cookie@^9.3.1": version "9.3.1" resolved "https://registry.yarnpkg.com/@fastify/cookie/-/cookie-9.3.1.tgz#48b89a356a23860c666e2fe522a084cc5c943d33" @@ -2346,7 +2338,7 @@ cookie-signature "^1.1.0" fastify-plugin "^4.0.0" -"@fastify/error@^3.0.0", "@fastify/error@^3.3.0", "@fastify/error@^3.4.0": +"@fastify/error@^3.3.0", "@fastify/error@^3.4.0": version "3.4.1" resolved "https://registry.yarnpkg.com/@fastify/error/-/error-3.4.1.tgz#b14bb4cac3dd4ec614becbc643d1511331a6425c" integrity sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ== @@ -6700,10 +6692,10 @@ cross-fetch@^4.0.0: dependencies: node-fetch "^2.6.12" -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== +cross-spawn@>=7.0.6, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" @@ -7623,9 +7615,9 @@ execa@^8.0.1: strip-final-newline "^3.0.0" execa@^9.1.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-9.4.0.tgz#071ff6516c46eb82af9a559dba3c891637a10f3f" - integrity sha512-yKHlle2YGxZE842MERVIplWwNH5VYmqqcPFgtnlU//K8gxuFFXu0pwd/CrfXTumFpeEiufsP7+opT/bPJa1yVw== + version "9.5.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-9.5.1.tgz#ab9b68073245e1111bba359962a34fcdb28deef2" + integrity sha512-QY5PPtSonnGwhhHDNI7+3RvY285c7iuJFFB+lU+oEzMY/gEGJ808owqJsrr8Otd1E/x07po1LkUBmdAc5duPAg== dependencies: "@sindresorhus/merge-streams" "^4.0.0" cross-spawn "^7.0.3" @@ -10290,9 +10282,9 @@ prettier@^2.8.7: integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== pretty-ms@^9.0.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-9.1.0.tgz#0ad44de6086454f48a168e5abb3c26f8db1b3253" - integrity sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw== + version "9.2.0" + resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-9.2.0.tgz#e14c0aad6493b69ed63114442a84133d7e560ef0" + integrity sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg== dependencies: parse-ms "^4.0.0" @@ -11087,16 +11079,7 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -11128,14 +11111,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12160,7 +12136,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -12178,15 +12154,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 9cc32d3f4c1b6a1b7a93dd9b23b18a0dfa968d7e Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Thu, 28 Nov 2024 02:11:42 +0800 Subject: [PATCH 15/44] chore: Add support for singlePhaseDrop for claimTo calls (#782) * chore: Add support for singlePhaseDrop for claimTo calls * remove comment --- package.json | 2 +- .../extensions/erc1155/write/claimTo.ts | 11 +- .../extensions/erc20/write/claimTo.ts | 10 +- .../extensions/erc721/write/claimTo.ts | 10 +- yarn.lock | 449 ++++++++++++------ 5 files changed, 318 insertions(+), 164 deletions(-) diff --git a/package.json b/package.json index ffc1e895c..2fd12d0fe 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "prisma": "^5.14.0", "prom-client": "^15.1.3", "superjson": "^2.2.1", - "thirdweb": "5.61.3", + "thirdweb": "^5.71.0", "uuid": "^9.0.1", "winston": "^3.14.1", "zod": "^3.23.8" diff --git a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts index ea58468f3..39bd1e4a4 100644 --- a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts @@ -1,4 +1,4 @@ -import { type Static, Type } from "@sinclair/typebox"; +import { Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; @@ -33,6 +33,11 @@ const requestBodySchema = Type.Object({ quantity: Type.String({ description: "Quantity of NFTs to mint", }), + singlePhaseDrop: Type.Optional( + Type.Boolean({ + description: "Whether the drop is a single phase drop", + }), + ), ...txOverridesWithValueSchema.properties, }); @@ -70,7 +75,8 @@ export async function erc1155claimTo(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { receiver, tokenId, quantity, txOverrides } = request.body; + const { receiver, tokenId, quantity, singlePhaseDrop, txOverrides } = + request.body; const { "x-backend-wallet-address": fromAddress, "x-account-address": accountAddress, @@ -91,6 +97,7 @@ export async function erc1155claimTo(fastify: FastifyInstance) { to: receiver, quantity: BigInt(quantity), tokenId: BigInt(tokenId), + singlePhaseDrop, }); const queueId = await queueTransaction({ diff --git a/src/server/routes/contract/extensions/erc20/write/claimTo.ts b/src/server/routes/contract/extensions/erc20/write/claimTo.ts index 182af4ba9..fd5a70ffd 100644 --- a/src/server/routes/contract/extensions/erc20/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/claimTo.ts @@ -1,4 +1,4 @@ -import { type Static, Type } from "@sinclair/typebox"; +import { Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; @@ -28,6 +28,11 @@ const requestBodySchema = Type.Object({ amount: Type.String({ description: "The amount of tokens to claim.", }), + singlePhaseDrop: Type.Optional( + Type.Boolean({ + description: "Whether the drop is a single phase drop", + }), + ), ...txOverridesWithValueSchema.properties, }); @@ -65,7 +70,7 @@ export async function erc20claimTo(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { recipient, amount, txOverrides } = request.body; + const { recipient, amount, singlePhaseDrop, txOverrides } = request.body; const { "x-backend-wallet-address": fromAddress, "x-account-address": accountAddress, @@ -84,6 +89,7 @@ export async function erc20claimTo(fastify: FastifyInstance) { from: fromAddress as Address, to: recipient, quantity: amount, + singlePhaseDrop, }); const queueId = await queueTransaction({ diff --git a/src/server/routes/contract/extensions/erc721/write/claimTo.ts b/src/server/routes/contract/extensions/erc721/write/claimTo.ts index 5772d4827..a18780e08 100644 --- a/src/server/routes/contract/extensions/erc721/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/claimTo.ts @@ -1,4 +1,4 @@ -import { type Static, Type } from "@sinclair/typebox"; +import { Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; @@ -30,6 +30,11 @@ const requestBodySchema = Type.Object({ quantity: Type.String({ description: "Quantity of NFTs to mint", }), + singlePhaseDrop: Type.Optional( + Type.Boolean({ + description: "Whether the drop is a single phase drop", + }), + ), ...txOverridesWithValueSchema.properties, }); @@ -66,7 +71,7 @@ export async function erc721claimTo(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { receiver, quantity, txOverrides } = request.body; + const { receiver, quantity, singlePhaseDrop, txOverrides } = request.body; const { "x-backend-wallet-address": fromAddress, "x-account-address": accountAddress, @@ -85,6 +90,7 @@ export async function erc721claimTo(fastify: FastifyInstance) { from: fromAddress as Address, to: receiver, quantity: BigInt(quantity), + singlePhaseDrop, }); const queueId = await queueTransaction({ diff --git a/yarn.lock b/yarn.lock index 1d724f715..6188d1965 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,11 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== +"@adraffy/ens-normalize@^1.10.1": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz#42cc67c5baa407ac25059fcd7d405cc5ecdb0c33" + integrity sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg== + "@ampproject/remapping@^2.3.0": version "2.3.0" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" @@ -1127,15 +1132,15 @@ preact "^10.16.0" sha.js "^2.4.11" -"@coinbase/wallet-sdk@4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-4.1.0.tgz#3224a102b724dcb1a63005f371d596ae2999953b" - integrity sha512-SkJJ72X/AA3+aS21sPs/4o4t6RVeDSA7HuBW4zauySX3eBiPU0zmVw95tXH/eNSX50agKz9WzeN8P5F+HcwLOw== +"@coinbase/wallet-sdk@4.2.3": + version "4.2.3" + resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-4.2.3.tgz#a30fa0605b24bc42c37f52a62d2442bcbb7734af" + integrity sha512-BcyHZ/Ec84z0emORzqdXDv4P0oV+tV3a0OirfA8Ko1JGBIAVvB+hzLvZzCDvnuZx7MTK+Dd8Y9Tjlo446BpCIg== dependencies: "@noble/hashes" "^1.4.0" clsx "^1.2.1" eventemitter3 "^5.0.1" - preact "^10.16.0" + preact "^10.24.2" "@coinbase/wallet-sdk@^3.9.0": version "3.9.3" @@ -2875,6 +2880,13 @@ dependencies: "@noble/hashes" "1.4.0" +"@noble/curves@1.6.0", "@noble/curves@~1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b" + integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== + dependencies: + "@noble/hashes" "1.5.0" + "@noble/curves@^1.4.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.5.0.tgz#7a9b9b507065d516e6dce275a1e31db8d2a100dd" @@ -2882,12 +2894,12 @@ dependencies: "@noble/hashes" "1.4.0" -"@noble/curves@~1.4.0": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.2.tgz#40309198c76ed71bc6dbf7ba24e81ceb4d0d1fe9" - integrity sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw== +"@noble/curves@^1.6.0", "@noble/curves@~1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.7.0.tgz#0512360622439256df892f21d25b388f52505e45" + integrity sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw== dependencies: - "@noble/hashes" "1.4.0" + "@noble/hashes" "1.6.0" "@noble/hashes@1.3.2": version "1.3.2" @@ -2899,16 +2911,26 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== -"@noble/hashes@1.4.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0", "@noble/hashes@~1.4.0": +"@noble/hashes@1.4.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== -"@noble/hashes@~1.5.0": +"@noble/hashes@1.5.0", "@noble/hashes@~1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== +"@noble/hashes@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.0.tgz#d4bfb516ad6e7b5111c216a5cc7075f4cf19e6c5" + integrity sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ== + +"@noble/hashes@^1.5.0", "@noble/hashes@~1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" + integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== + "@node-lightning/checksum@^0.27.0": version "0.27.4" resolved "https://registry.yarnpkg.com/@node-lightning/checksum/-/checksum-0.27.4.tgz#493004e76aa76cdbab46f01bf445e4010c30a179" @@ -3080,6 +3102,11 @@ resolved "https://registry.yarnpkg.com/@passwordless-id/webauthn/-/webauthn-1.6.2.tgz#677e963280eac2a98eb3317b54c80f9f59d56d15" integrity sha512-52Cna/kaJ6iuYgTko+LuHCY5NUgoJTQ+iLWbvCHWiI0pT+zUeKz1+g22mWGlSi/JDrFGwZTKG/PL2YDaQGo0qQ== +"@passwordless-id/webauthn@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@passwordless-id/webauthn/-/webauthn-2.1.2.tgz#011d0d03a1e2dd9e560d7b305bd9c749a435d761" + integrity sha512-Ahj+A3O0gP3EsLV4FRXjfhbzzP895d8CnHKmhT1hkAz1zLSBCRE/iXJsasL1kwGoriDFLJ+YtO6x1rok4SZH2g== + "@pedrouid/environment@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@pedrouid/environment/-/environment-1.0.1.tgz#858f0f8a057340e0b250398b75ead77d6f4342ec" @@ -3235,6 +3262,11 @@ resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.0.tgz#6df8d983546cfd1999c8512f3a8ad85a6e7fcee8" integrity sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A== +"@radix-ui/react-context@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.1.tgz#82074aa83a472353bb22e86f11bcbd1c61c4c71a" + integrity sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q== + "@radix-ui/react-dialog@1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz#71657b1b116de6c7a0b03242d7d43e01062c7300" @@ -3256,25 +3288,25 @@ aria-hidden "^1.1.1" react-remove-scroll "2.5.5" -"@radix-ui/react-dialog@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@radix-ui/react-dialog/-/react-dialog-1.1.1.tgz#4906507f7b4ad31e22d7dad69d9330c87c431d44" - integrity sha512-zysS+iU4YP3STKNS6USvFVqI4qqx8EpiwmT5TuCApVEBca+eRCbONi4EgzfNSuVnOXvC5UPHHMjs8RXO6DH9Bg== +"@radix-ui/react-dialog@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dialog/-/react-dialog-1.1.2.tgz#d9345575211d6f2d13e209e84aec9a8584b54d6c" + integrity sha512-Yj4dZtqa2o+kG61fzB0H2qUvmwBA2oyQroGLyNtBj1beo1khoQ3q1a2AO8rrQYjd8256CO9+N8L9tvsS+bnIyA== dependencies: "@radix-ui/primitive" "1.1.0" "@radix-ui/react-compose-refs" "1.1.0" - "@radix-ui/react-context" "1.1.0" - "@radix-ui/react-dismissable-layer" "1.1.0" - "@radix-ui/react-focus-guards" "1.1.0" + "@radix-ui/react-context" "1.1.1" + "@radix-ui/react-dismissable-layer" "1.1.1" + "@radix-ui/react-focus-guards" "1.1.1" "@radix-ui/react-focus-scope" "1.1.0" "@radix-ui/react-id" "1.1.0" - "@radix-ui/react-portal" "1.1.1" - "@radix-ui/react-presence" "1.1.0" + "@radix-ui/react-portal" "1.1.2" + "@radix-ui/react-presence" "1.1.1" "@radix-ui/react-primitive" "2.0.0" "@radix-ui/react-slot" "1.1.0" "@radix-ui/react-use-controllable-state" "1.1.0" aria-hidden "^1.1.1" - react-remove-scroll "2.5.7" + react-remove-scroll "2.6.0" "@radix-ui/react-dismissable-layer@1.0.5": version "1.0.5" @@ -3288,10 +3320,10 @@ "@radix-ui/react-use-callback-ref" "1.0.1" "@radix-ui/react-use-escape-keydown" "1.0.3" -"@radix-ui/react-dismissable-layer@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz#2cd0a49a732372513733754e6032d3fb7988834e" - integrity sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig== +"@radix-ui/react-dismissable-layer@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.1.tgz#cbdcb739c5403382bdde5f9243042ba643883396" + integrity sha512-QSxg29lfr/xcev6kSz7MAlmDnzbP1eI/Dwn3Tp1ip0KT5CUELsxkekFEMVBEoykI3oV39hKT4TKZzBNMbcTZYQ== dependencies: "@radix-ui/primitive" "1.1.0" "@radix-ui/react-compose-refs" "1.1.0" @@ -3306,10 +3338,10 @@ dependencies: "@babel/runtime" "^7.13.10" -"@radix-ui/react-focus-guards@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz#8e9abb472a9a394f59a1b45f3dd26cfe3fc6da13" - integrity sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw== +"@radix-ui/react-focus-guards@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz#8635edd346304f8b42cae86b05912b61aef27afe" + integrity sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg== "@radix-ui/react-focus-scope@1.0.4": version "1.0.4" @@ -3335,6 +3367,11 @@ resolved "https://registry.yarnpkg.com/@radix-ui/react-icons/-/react-icons-1.3.0.tgz#c61af8f323d87682c5ca76b856d60c2312dbcb69" integrity sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw== +"@radix-ui/react-icons@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-icons/-/react-icons-1.3.2.tgz#09be63d178262181aeca5fb7f7bc944b10a7f441" + integrity sha512-fyQIhGDhzfc9pK2kH6Pl9c4BDJGfMkPqkyIgYDthyNYoNg3wVhoJMMh19WS4Up/1KMPFVpNsT2q3WmXn2N1m6g== + "@radix-ui/react-id@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.0.1.tgz#73cdc181f650e4df24f0b6a5b7aa426b912c88c0" @@ -3391,10 +3428,10 @@ "@babel/runtime" "^7.13.10" "@radix-ui/react-primitive" "1.0.3" -"@radix-ui/react-portal@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.1.tgz#1957f1eb2e1aedfb4a5475bd6867d67b50b1d15f" - integrity sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g== +"@radix-ui/react-portal@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.2.tgz#51eb46dae7505074b306ebcb985bf65cc547d74e" + integrity sha512-WeDYLGPxJb/5EGBoedyJbT0MpoULmwnIPMJMSldkuiMsBAv7N1cRdsTWZWht9vpPOiN3qyiGAtbK2is47/uMFg== dependencies: "@radix-ui/react-primitive" "2.0.0" "@radix-ui/react-use-layout-effect" "1.1.0" @@ -3408,10 +3445,10 @@ "@radix-ui/react-compose-refs" "1.0.1" "@radix-ui/react-use-layout-effect" "1.0.1" -"@radix-ui/react-presence@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.0.tgz#227d84d20ca6bfe7da97104b1a8b48a833bfb478" - integrity sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ== +"@radix-ui/react-presence@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.1.tgz#98aba423dba5e0c687a782c0669dcd99de17f9b1" + integrity sha512-IeFXVi4YS1K0wVZzXNrbaaUvIJ3qdY+/Ih4eHFhWA9SwGR9UDX7Ck8abvL57C4cv3wwMvUE0OG69Qc3NCcTe/A== dependencies: "@radix-ui/react-compose-refs" "1.1.0" "@radix-ui/react-use-layout-effect" "1.1.0" @@ -3465,19 +3502,19 @@ "@radix-ui/react-use-controllable-state" "1.0.1" "@radix-ui/react-visually-hidden" "1.0.3" -"@radix-ui/react-tooltip@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@radix-ui/react-tooltip/-/react-tooltip-1.1.2.tgz#c42db2ffd7dcc6ff3d65407c8cb70490288f518d" - integrity sha512-9XRsLwe6Yb9B/tlnYCPVUd/TFS4J7HuOZW345DCeC6vKIxQGMZdx21RK4VoZauPD5frgkXTYVS5y90L+3YBn4w== +"@radix-ui/react-tooltip@1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-tooltip/-/react-tooltip-1.1.4.tgz#152d8485859b80d395d6b3229f676fef3cec56b3" + integrity sha512-QpObUH/ZlpaO4YgHSaYzrLO2VuO+ZBFFgGzjMUPwtiYnAzzNNDPJeEGRrT7qNOrWm/Jr08M1vlp+vTHtnSQ0Uw== dependencies: "@radix-ui/primitive" "1.1.0" "@radix-ui/react-compose-refs" "1.1.0" - "@radix-ui/react-context" "1.1.0" - "@radix-ui/react-dismissable-layer" "1.1.0" + "@radix-ui/react-context" "1.1.1" + "@radix-ui/react-dismissable-layer" "1.1.1" "@radix-ui/react-id" "1.1.0" "@radix-ui/react-popper" "1.2.0" - "@radix-ui/react-portal" "1.1.1" - "@radix-ui/react-presence" "1.1.0" + "@radix-ui/react-portal" "1.1.2" + "@radix-ui/react-presence" "1.1.1" "@radix-ui/react-primitive" "2.0.0" "@radix-ui/react-slot" "1.1.0" "@radix-ui/react-use-controllable-state" "1.1.0" @@ -3739,16 +3776,21 @@ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" integrity sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g== -"@scure/base@~1.1.6": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.7.tgz#fe973311a5c6267846aa131bc72e96c5d40d2b30" - integrity sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g== +"@scure/base@~1.1.7": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" + integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== "@scure/base@~1.1.8": version "1.1.8" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.8.tgz#8f23646c352f020c83bca750a82789e246d42b50" integrity sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg== +"@scure/base@~1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" + integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== + "@scure/bip32@1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.2.tgz#90e78c027d5e30f0b22c1f8d50ff12f3fb7559f8" @@ -3767,14 +3809,23 @@ "@noble/hashes" "~1.3.2" "@scure/base" "~1.1.4" -"@scure/bip32@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.4.0.tgz#4e1f1e196abedcef395b33b9674a042524e20d67" - integrity sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg== +"@scure/bip32@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.5.0.tgz#dd4a2e1b8a9da60e012e776d954c4186db6328e6" + integrity sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw== + dependencies: + "@noble/curves" "~1.6.0" + "@noble/hashes" "~1.5.0" + "@scure/base" "~1.1.7" + +"@scure/bip32@^1.5.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.0.tgz#6dbc6b4af7c9101b351f41231a879d8da47e0891" + integrity sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA== dependencies: - "@noble/curves" "~1.4.0" - "@noble/hashes" "~1.4.0" - "@scure/base" "~1.1.6" + "@noble/curves" "~1.7.0" + "@noble/hashes" "~1.6.0" + "@scure/base" "~1.2.1" "@scure/bip39@1.2.1": version "1.2.1" @@ -3800,6 +3851,14 @@ "@noble/hashes" "~1.5.0" "@scure/base" "~1.1.8" +"@scure/bip39@^1.4.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.0.tgz#c8f9533dbd787641b047984356531d84485f19be" + integrity sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A== + dependencies: + "@noble/hashes" "~1.6.0" + "@scure/base" "~1.2.1" + "@sec-ant/readable-stream@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz#60de891bb126abfdc5410fdc6166aca065f10a0c" @@ -4673,10 +4732,10 @@ resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.29.0.tgz#d0b3d12c07d5a47f42ab0c1ed4f317106f3d4b20" integrity sha512-WgPTRs58hm9CMzEr5jpISe8HXa3qKQ8CxewdYZeVnA54JrPY9B1CZiwsCoLpLkf0dGRZq+LcX5OiJb0bEsOFww== -"@tanstack/query-core@5.56.2": - version "5.56.2" - resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.56.2.tgz#2def2fb0290cd2836bbb08afb0c175595bb8109b" - integrity sha512-gor0RI3/R5rVV3gXfddh1MM+hgl0Z4G7tj6Xxpq6p2I03NGPaJ8dITY9Gz05zYYb/EJq9vPas/T4wn9EaDPd4Q== +"@tanstack/query-core@5.59.20": + version "5.59.20" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.59.20.tgz#356718976536727b9af0ad1163a21fd6a44ee0a9" + integrity sha512-e8vw0lf7KwfGe1if4uPFhvZRWULqHjFcz3K8AebtieXvnMOz5FSzlZe3mTLlPuUBcydCnBRqYs2YJ5ys68wwLg== "@tanstack/react-query@5.29.2": version "5.29.2" @@ -4685,12 +4744,12 @@ dependencies: "@tanstack/query-core" "5.29.0" -"@tanstack/react-query@5.56.2": - version "5.56.2" - resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.56.2.tgz#3a0241b9d010910905382f5e99160997b8795f91" - integrity sha512-SR0GzHVo6yzhN72pnRhkEFRAHMsUo5ZPzAxfTMvUxFIDVS6W9LYUp6nXW3fcHVdg0ZJl8opSH85jqahvm6DSVg== +"@tanstack/react-query@5.60.2": + version "5.60.2" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.60.2.tgz#a65db96702c11f3f868c40372ce66f05c2a77cc6" + integrity sha512-JhpJNxIAPuE0YCpP1Py4zAsgx+zY0V531McRMtQbwVlJF8+mlZwcOPrzGmPV248K8IP+mPbsfxXToVNMNwjUcw== dependencies: - "@tanstack/query-core" "5.56.2" + "@tanstack/query-core" "5.59.20" "@thirdweb-dev/auth@^4.1.87": version "4.1.88" @@ -5270,10 +5329,10 @@ lodash.isequal "4.5.0" uint8arrays "3.1.0" -"@walletconnect/core@2.16.3": - version "2.16.3" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.16.3.tgz#b9b5bd240aac220f87ba3ace2ef70331ab5199b1" - integrity sha512-rY2j4oypdF8kR6JesT5zgPbkZaKJ74RySpIq4gEnxEYE7yrQmh0W11gUjs+3g2Z0kKSY546cqd7JOxdW3yhvsQ== +"@walletconnect/core@2.17.2": + version "2.17.2" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.17.2.tgz#877dc03f190d7b262bff8ce346330fdf1019cd83" + integrity sha512-O9VUsFg78CbvIaxfQuZMsHcJ4a2Z16DRz/O4S+uOAcGKhH/i/ln8hp864Tb+xRvifWSzaZ6CeAVxk657F+pscA== dependencies: "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-provider" "1.0.14" @@ -5286,8 +5345,9 @@ "@walletconnect/relay-auth" "1.0.4" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.16.3" - "@walletconnect/utils" "2.16.3" + "@walletconnect/types" "2.17.2" + "@walletconnect/utils" "2.17.2" + "@walletconnect/window-getters" "1.0.1" events "3.3.0" lodash.isequal "4.5.0" uint8arrays "3.1.0" @@ -5315,20 +5375,21 @@ "@walletconnect/utils" "2.12.2" events "^3.3.0" -"@walletconnect/ethereum-provider@2.16.3": - version "2.16.3" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.16.3.tgz#248a8b902cd5dfa414a0b92911b550aedabdfd46" - integrity sha512-5hUrtyDf6sWzyJTlbpIbUK4mgLVs3IoJ6I+kcum4rEimx4F3WjI64sYThquZCDboWqftddxbG9s7hdKCVhjqWQ== +"@walletconnect/ethereum-provider@2.17.2": + version "2.17.2" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.17.2.tgz#7ac8091daf65f33c9f77cb08f524246c638e9e66" + integrity sha512-o4aL4KkUKT+n0iDwGzC6IY4bl+9n8bwOeT2KwifaVHsFw/irhtRPlsAQQH4ezOiPyk8cri1KN9dPk/YeU0pe6w== dependencies: "@walletconnect/jsonrpc-http-connection" "1.0.8" "@walletconnect/jsonrpc-provider" "1.0.14" "@walletconnect/jsonrpc-types" "1.0.4" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/modal" "2.6.2" - "@walletconnect/sign-client" "2.16.3" - "@walletconnect/types" "2.16.3" - "@walletconnect/universal-provider" "2.16.3" - "@walletconnect/utils" "2.16.3" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/modal" "2.7.0" + "@walletconnect/sign-client" "2.17.2" + "@walletconnect/types" "2.17.2" + "@walletconnect/universal-provider" "2.17.2" + "@walletconnect/utils" "2.17.2" events "3.3.0" "@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": @@ -5444,6 +5505,13 @@ dependencies: valtio "1.11.2" +"@walletconnect/modal-core@2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.7.0.tgz#73c13c3b7b0abf9ccdbac9b242254a86327ce0a4" + integrity sha512-oyMIfdlNdpyKF2kTJowTixZSo0PGlCJRdssUN/EZdA6H6v03hZnf09JnwpljZNfir2M65Dvjm/15nGrDQnlxSA== + dependencies: + valtio "1.11.2" + "@walletconnect/modal-ui@2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz#fa57c087c57b7f76aaae93deab0f84bb68b59cf9" @@ -5454,7 +5522,25 @@ motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal@2.6.2", "@walletconnect/modal@^2.6.2": +"@walletconnect/modal-ui@2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.7.0.tgz#dbbb7ee46a5a25f7d39db622706f2d197b268cbb" + integrity sha512-gERYvU7D7K1ANCN/8vUgsE0d2hnRemfAFZ2novm9aZBg7TEd/4EgB+AqbJ+1dc7GhOL6dazckVq78TgccHb7mQ== + dependencies: + "@walletconnect/modal-core" "2.7.0" + lit "2.8.0" + motion "10.16.2" + qrcode "1.5.3" + +"@walletconnect/modal@2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.7.0.tgz#55f969796d104cce1205f5f844d8f8438b79723a" + integrity sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw== + dependencies: + "@walletconnect/modal-core" "2.7.0" + "@walletconnect/modal-ui" "2.7.0" + +"@walletconnect/modal@^2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== @@ -5525,19 +5611,19 @@ "@walletconnect/utils" "2.13.1" events "3.3.0" -"@walletconnect/sign-client@2.16.3": - version "2.16.3" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.16.3.tgz#abf686e54408802a626a105b096aa9cc3c8a2d14" - integrity sha512-m86S5ig4xkejpOushGY2WluUUXSkj+f3D3mNgpG4JPQSsXeE26n6wVCTyR9EiIPfSNhSeRmwR2rqDlMOyFpwXA== +"@walletconnect/sign-client@2.17.2": + version "2.17.2" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.17.2.tgz#b8bd125d7c34a67916745ebbdbbc834db5518c8b" + integrity sha512-/wigdCIQjlBXSWY43Id0IPvZ5biq4HiiQZti8Ljvx408UYjmqcxcBitbj2UJXMYkid7704JWAB2mw32I1HgshQ== dependencies: - "@walletconnect/core" "2.16.3" + "@walletconnect/core" "2.17.2" "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "2.1.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.16.3" - "@walletconnect/utils" "2.16.3" + "@walletconnect/types" "2.17.2" + "@walletconnect/utils" "2.17.2" events "3.3.0" "@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": @@ -5571,10 +5657,10 @@ "@walletconnect/logger" "2.1.2" events "3.3.0" -"@walletconnect/types@2.16.3": - version "2.16.3" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.16.3.tgz#e5886b3ac072634847bbfb60b178c09c8fe89199" - integrity sha512-ul/AKC/+3+GqJfK17XNvjxRUec8YVRqCEe32O0CQrO21umfeIcU5aPgSW0j+9OKE87KKmRZuERysBh18bMxT/Q== +"@walletconnect/types@2.17.2": + version "2.17.2" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.17.2.tgz#f9afff242563be33f377de689b03b482f5b20aee" + integrity sha512-j/+0WuO00lR8ntu7b1+MKe/r59hNwYLFzW0tTmozzhfAlDL+dYwWasDBNq4AH8NbVd7vlPCQWmncH7/6FVtOfQ== dependencies: "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" @@ -5598,20 +5684,23 @@ "@walletconnect/utils" "2.12.2" events "^3.3.0" -"@walletconnect/universal-provider@2.16.3": - version "2.16.3" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.16.3.tgz#93926934ae4a45330962bb217dadb121d56a1ed1" - integrity sha512-MwP0sdKMC29aL63LP6hjGLq4Ir/ArRukC+wE2Nora37VzDQmegHnipOYoNFMReNvCMpGNsk+zKq9GKp0p/0glA== +"@walletconnect/universal-provider@2.17.2": + version "2.17.2" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.17.2.tgz#f4627dd9b66db3bacc31864584112868be23bf08" + integrity sha512-yIWDhBODRa9J349d/i1sObzon0vy4n+7R3MvGQQYaU1EVrV+WfoGSRsu8U7rYsL067/MAUu9t/QrpPblaSbz7g== dependencies: + "@walletconnect/events" "1.0.1" "@walletconnect/jsonrpc-http-connection" "1.0.8" "@walletconnect/jsonrpc-provider" "1.0.14" "@walletconnect/jsonrpc-types" "1.0.4" "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/keyvaluestorage" "1.1.1" "@walletconnect/logger" "2.1.2" - "@walletconnect/sign-client" "2.16.3" - "@walletconnect/types" "2.16.3" - "@walletconnect/utils" "2.16.3" + "@walletconnect/sign-client" "2.17.2" + "@walletconnect/types" "2.17.2" + "@walletconnect/utils" "2.17.2" events "3.3.0" + lodash "4.17.21" "@walletconnect/utils@2.12.2": version "2.12.2" @@ -5653,25 +5742,29 @@ query-string "7.1.3" uint8arrays "3.1.0" -"@walletconnect/utils@2.16.3": - version "2.16.3" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.16.3.tgz#1413fbca64e8eedb8eed00945a984a11dbd2a3b3" - integrity sha512-gWPIQ4LhOKEnHsFbV8Ey++3mkaRopLN7F9aLT6mwcoQ5JdZiMK4P6gP7p0b9V4YnBmA4x8Yt4ySv919tjN3Z0A== +"@walletconnect/utils@2.17.2": + version "2.17.2" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.17.2.tgz#b4b12e3f5ebbfd883b2a5c87fb818e53501dc7ea" + integrity sha512-T7eLRiuw96fgwUy2A5NZB5Eu87ukX8RCVoO9lji34RFV4o2IGU9FhTEWyd4QQKI8OuQRjSknhbJs0tU0r0faPw== dependencies: + "@ethersproject/hash" "5.7.0" + "@ethersproject/transactions" "5.7.0" "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" "@stablelib/random" "1.0.2" "@stablelib/sha256" "1.0.1" "@stablelib/x25519" "1.0.3" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/keyvaluestorage" "1.1.1" "@walletconnect/relay-api" "1.0.11" "@walletconnect/relay-auth" "1.0.4" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.16.3" + "@walletconnect/types" "2.17.2" "@walletconnect/window-getters" "1.0.1" "@walletconnect/window-metadata" "1.0.1" detect-browser "5.3.0" - elliptic "^6.5.7" + elliptic "6.6.0" query-string "7.1.3" uint8arrays "3.1.0" @@ -5709,10 +5802,10 @@ abitype@1.0.0: resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.0.tgz#237176dace81d90d018bebf3a45cb42f2a2d9e97" integrity sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ== -abitype@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.5.tgz#29d0daa3eea867ca90f7e4123144c1d1270774b6" - integrity sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw== +abitype@1.0.6, abitype@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.6.tgz#76410903e1d88e34f1362746e2d407513c38565b" + integrity sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A== abort-controller@^3.0.0: version "3.0.0" @@ -6998,7 +7091,7 @@ ejs@^3.1.10: dependencies: jake "^10.8.5" -elliptic@6.5.4, elliptic@>=6.6.0, elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.5, elliptic@^6.5.7: +elliptic@6.5.4, elliptic@6.6.0, elliptic@>=6.6.0, elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.5, elliptic@^6.5.7: version "6.6.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.0.tgz#5919ec723286c1edf28685aa89261d4761afa210" integrity sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA== @@ -7571,16 +7664,16 @@ eventemitter3@4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== +eventemitter3@5.0.1, eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + eventemitter3@^4.0.0, eventemitter3@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -eventemitter3@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" - integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== - events@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" @@ -8476,6 +8569,11 @@ input-otp@^1.2.4: resolved "https://registry.yarnpkg.com/input-otp/-/input-otp-1.2.4.tgz#9834af8675ac72c7f1b7c010f181b3b4ffdd0f72" integrity sha512-md6rhmD+zmMnUh5crQNSQxq3keBRYvE3odbr4Qb9g2NWzQv9azi+t1a3X4TBTbh98fsGHgEEJlzbe1q860uGCA== +input-otp@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/input-otp/-/input-otp-1.4.1.tgz#bc22e68b14b1667219d54adf74243e37ea79cf84" + integrity sha512-+yvpmKYKHi9jIGngxagY9oWiiblPB7+nEO75F2l2o4vs+6vpPZZmUl4tBNYuTCvQjhvEIbdNeJu70bhfYP2nbw== + int64-buffer@^0.1.9: version "0.1.10" resolved "https://registry.yarnpkg.com/int64-buffer/-/int64-buffer-0.1.10.tgz#277b228a87d95ad777d07c13832022406a473423" @@ -8690,6 +8788,11 @@ isows@1.0.4: resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.4.tgz#810cd0d90cc4995c26395d2aa4cfa4037ebdf061" integrity sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ== +isows@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.6.tgz#0da29d706fa51551c663c627ace42769850f86e7" + integrity sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw== + istanbul-lib-coverage@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" @@ -9201,7 +9304,7 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== -lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.21: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -9869,6 +9972,32 @@ os-browserify@^0.3.0: resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A== +ox@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ox/-/ox-0.1.2.tgz#0f791be2ccabeaf4928e6d423498fe1c8094e560" + integrity sha512-ak/8K0Rtphg9vnRJlbOdaX9R7cmxD2MiSthjWGaQdMk3D7hrAlDoM+6Lxn7hN52Za3vrXfZ7enfke/5WjolDww== + dependencies: + "@adraffy/ens-normalize" "^1.10.1" + "@noble/curves" "^1.6.0" + "@noble/hashes" "^1.5.0" + "@scure/bip32" "^1.5.0" + "@scure/bip39" "^1.4.0" + abitype "^1.0.6" + eventemitter3 "5.0.1" + +ox@0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ox/-/ox-0.2.1.tgz#19386e39d289099f7716a7a5f1e623f97c8027d8" + integrity sha512-BmB0+yDHi/OELuP6zPTtHk0A7sGtUVZ31TUMVlqnnf0Mu834LZegw7RliMsCFSHrL1j62yxdSPIkSLmBM0rD4Q== + dependencies: + "@adraffy/ens-normalize" "^1.10.1" + "@noble/curves" "^1.6.0" + "@noble/hashes" "^1.5.0" + "@scure/bip32" "^1.5.0" + "@scure/bip39" "^1.4.0" + abitype "^1.0.6" + eventemitter3 "5.0.1" + p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -10266,6 +10395,11 @@ preact@^10.16.0: resolved "https://registry.yarnpkg.com/preact/-/preact-10.23.2.tgz#52deec92796ae0f0cc6b034d9c66e0fbc1b837dc" integrity sha512-kKYfePf9rzKnxOAKDpsWhg/ysrHPqT+yQ7UW4JjdnqjFIeNUnNcEJvhuA8fDenxAGWzUqtd51DfVg7xp/8T9NA== +preact@^10.24.2: + version "10.25.0" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.25.0.tgz#22a1c93ce97336c5d01d74f363433ab0cd5cde64" + integrity sha512-6bYnzlLxXV3OSpUxLdaxBmE7PMOu0aR3pG6lryK/0jmvcDFPlcXGQAt5DpK3RITWiDrfYZRI0druyaK/S9kYLg== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -10545,7 +10679,7 @@ react-is@^16.7.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-remove-scroll-bar@^2.3.3, react-remove-scroll-bar@^2.3.4: +react-remove-scroll-bar@^2.3.3, react-remove-scroll-bar@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.6.tgz#3e585e9d163be84a010180b18721e851ac81a29c" integrity sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g== @@ -10564,12 +10698,12 @@ react-remove-scroll@2.5.5: use-callback-ref "^1.3.0" use-sidecar "^1.1.2" -react-remove-scroll@2.5.7: - version "2.5.7" - resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz#15a1fd038e8497f65a695bf26a4a57970cac1ccb" - integrity sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA== +react-remove-scroll@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.6.0.tgz#fb03a0845d7768a4f1519a99fdb84983b793dc07" + integrity sha512-I2U4JVEsQenxDAKaVa3VZ/JeJZe0/2DxPWL8Tj8yLKctQJQiZM52pn/GWFpSp8dftjM3pSAHVJZscAnC/y+ySQ== dependencies: - react-remove-scroll-bar "^2.3.4" + react-remove-scroll-bar "^2.3.6" react-style-singleton "^2.2.1" tslib "^2.1.0" use-callback-ref "^1.3.0" @@ -11286,31 +11420,32 @@ thirdweb@5.26.0: uqr "0.1.2" viem "2.10.9" -thirdweb@5.61.3: - version "5.61.3" - resolved "https://registry.yarnpkg.com/thirdweb/-/thirdweb-5.61.3.tgz#f52e5fee0ba8c3b7ac6cd68bc33d7a85f185ebd2" - integrity sha512-7rZ46VF/8wd8tj534+LTY9MQQmglsSl0cnsgCo7+xFyZx7uArXdqMDi6a6NKZwsHdEaijlFD36lYlTXm6DCLIw== +thirdweb@^5.71.0: + version "5.71.0" + resolved "https://registry.yarnpkg.com/thirdweb/-/thirdweb-5.71.0.tgz#502bc76160eb03e40d09526e50e32a15ae6e0f9e" + integrity sha512-Cehpihu5727LeTTRypXwzo6Y8N4Y7S2KUlrXWExR2svLxICfCt/YfJ69f+otoEk9zb1u6WHvOvQBw5mMk15e3A== dependencies: - "@coinbase/wallet-sdk" "4.1.0" + "@coinbase/wallet-sdk" "4.2.3" "@emotion/react" "11.13.3" "@emotion/styled" "11.13.0" "@google/model-viewer" "2.1.1" - "@noble/curves" "1.4.0" - "@noble/hashes" "1.4.0" - "@passwordless-id/webauthn" "^1.6.1" - "@radix-ui/react-dialog" "1.1.1" + "@noble/curves" "1.6.0" + "@noble/hashes" "1.5.0" + "@passwordless-id/webauthn" "^2.1.2" + "@radix-ui/react-dialog" "1.1.2" "@radix-ui/react-focus-scope" "1.1.0" - "@radix-ui/react-icons" "1.3.0" - "@radix-ui/react-tooltip" "1.1.2" - "@tanstack/react-query" "5.56.2" - "@walletconnect/ethereum-provider" "2.16.3" - "@walletconnect/sign-client" "2.16.3" - abitype "1.0.5" + "@radix-ui/react-icons" "1.3.2" + "@radix-ui/react-tooltip" "1.1.4" + "@tanstack/react-query" "5.60.2" + "@walletconnect/ethereum-provider" "2.17.2" + "@walletconnect/sign-client" "2.17.2" + abitype "1.0.6" fuse.js "7.0.0" - input-otp "^1.2.4" + input-otp "^1.4.1" mipd "0.0.7" + ox "0.2.1" uqr "0.1.2" - viem "2.21.16" + viem "2.21.45" thread-stream@^0.15.1: version "0.15.2" @@ -11750,20 +11885,20 @@ viem@2.10.9: isows "1.0.4" ws "8.13.0" -viem@2.21.16: - version "2.21.16" - resolved "https://registry.yarnpkg.com/viem/-/viem-2.21.16.tgz#cf32200bbd1696bd6e86de7e1c12fcdfd77b63c1" - integrity sha512-SvhaPzTj3a+zR/5OmtJ0acjA6oGDrgPg4vtO8KboXtvbjksXEkz+oFaNjZDgxpkqbps2SLi8oPCjdpRm6WgDmw== +viem@2.21.45: + version "2.21.45" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.21.45.tgz#7a445428d4909cc334f231ee916ede1b69190603" + integrity sha512-I+On/IiaObQdhDKWU5Rurh6nf3G7reVkAODG5ECIfjsrGQ3EPJnxirUPT4FNV6bWER5iphoG62/TidwuTSOA1A== dependencies: - "@adraffy/ens-normalize" "1.10.0" - "@noble/curves" "1.4.0" - "@noble/hashes" "1.4.0" - "@scure/bip32" "1.4.0" + "@noble/curves" "1.6.0" + "@noble/hashes" "1.5.0" + "@scure/bip32" "1.5.0" "@scure/bip39" "1.4.0" - abitype "1.0.5" - isows "1.0.4" - webauthn-p256 "0.0.5" - ws "8.17.1" + abitype "1.0.6" + isows "1.0.6" + ox "0.1.2" + webauthn-p256 "0.0.10" + ws "8.18.0" vite-node@2.0.3: version "2.0.3" @@ -12036,10 +12171,10 @@ web3-validator@^2.0.6: web3-types "^1.6.0" zod "^3.21.4" -webauthn-p256@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/webauthn-p256/-/webauthn-p256-0.0.5.tgz#0baebd2ba8a414b21cc09c0d40f9dd0be96a06bd" - integrity sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg== +webauthn-p256@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/webauthn-p256/-/webauthn-p256-0.0.10.tgz#877e75abe8348d3e14485932968edf3325fd2fdd" + integrity sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA== dependencies: "@noble/curves" "^1.4.0" "@noble/hashes" "^1.4.0" @@ -12168,7 +12303,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@7.4.6, ws@8.13.0, ws@8.17.1, ws@8.9.0, ws@>=8.17.1, ws@^7.4.0, ws@^7.5.1, ws@^8.0.0: +ws@7.4.6, ws@8.13.0, ws@8.18.0, ws@8.9.0, ws@>=8.17.1, ws@^7.4.0, ws@^7.5.1, ws@^8.0.0: version "8.18.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== From b0fd43e8e265e58bc2e843fd870157e602309914 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:26:46 +0800 Subject: [PATCH 16/44] chore(deps): bump the npm_and_yarn group across 2 directories with 4 updates (#781) Bumps the npm_and_yarn group with 2 updates in the / directory: [rollup](https://github.com/rollup/rollup) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). Bumps the npm_and_yarn group with 3 updates in the /sdk directory: [braces](https://github.com/micromatch/braces), [micromatch](https://github.com/micromatch/micromatch) and [rollup](https://github.com/rollup/rollup). Updates `rollup` from 4.18.1 to 4.27.4 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.18.1...v4.27.4) Updates `vite` from 5.3.4 to 5.4.11 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.11/packages/vite) Updates `braces` from 3.0.2 to 3.0.3 - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) Updates `micromatch` from 4.0.5 to 4.0.8 - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8) Updates `rollup` from 2.79.1 to 2.79.2 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.18.1...v4.27.4) --- updated-dependencies: - dependency-name: rollup dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: vite dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: braces dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: micromatch dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: rollup dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- sdk/yarn.lock | 32 +++--- yarn.lock | 284 +++++++++++++++++++++++++++++--------------------- 2 files changed, 184 insertions(+), 132 deletions(-) diff --git a/sdk/yarn.lock b/sdk/yarn.lock index 2898c0385..2cdcc37fe 100644 --- a/sdk/yarn.lock +++ b/sdk/yarn.lock @@ -554,12 +554,12 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" browserslist@^4.21.9: version "4.22.1" @@ -764,10 +764,10 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" @@ -1096,11 +1096,11 @@ merge2@^1.3.0: integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" min-indent@^1.0.0: @@ -1326,9 +1326,9 @@ reusify@^1.0.4: integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rollup@^2.79.1: - version "2.79.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" - integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== + version "2.79.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.2.tgz#f150e4a5db4b121a21a747d762f701e5e9f49090" + integrity sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ== optionalDependencies: fsevents "~2.3.2" diff --git a/yarn.lock b/yarn.lock index 6188d1965..bc76d8502 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3631,85 +3631,95 @@ resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.1.0.tgz#f817d1d3265ac5415dadc67edab30ae196696438" integrity sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg== -"@rollup/rollup-android-arm-eabi@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz#f0da481244b7d9ea15296b35f7fe39cd81157396" - integrity sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA== - -"@rollup/rollup-android-arm64@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz#82ab3c575f4235fb647abea5e08eec6cf325964e" - integrity sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg== - -"@rollup/rollup-darwin-arm64@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz#6a530452e68a9152809ce58de1f89597632a085b" - integrity sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ== - -"@rollup/rollup-darwin-x64@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz#47727479f5ca292cf434d7e75af2725b724ecbc7" - integrity sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA== - -"@rollup/rollup-linux-arm-gnueabihf@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz#46193c498aa7902a8db89ac00128060320e84fef" - integrity sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g== - -"@rollup/rollup-linux-arm-musleabihf@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz#22d831fe239643c1d05c98906420325cee439d85" - integrity sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ== - -"@rollup/rollup-linux-arm64-gnu@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz#19abd33695ec9d588b4a858d122631433084e4a3" - integrity sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ== - -"@rollup/rollup-linux-arm64-musl@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz#d60af8c0b9be424424ff96a0ba19fce65d26f6ab" - integrity sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ== - -"@rollup/rollup-linux-powerpc64le-gnu@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz#b1194e5ed6d138fdde0842d126fccde74a90f457" - integrity sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ== - -"@rollup/rollup-linux-riscv64-gnu@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz#f5a635c017b9bff8b856b0221fbd5c0e3373b7ec" - integrity sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg== - -"@rollup/rollup-linux-s390x-gnu@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz#f1043d9f4026bf6995863cb3f8dd4732606e4baa" - integrity sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg== - -"@rollup/rollup-linux-x64-gnu@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz#1e781730be445119f06c9df5f185e193bc82c610" - integrity sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g== - -"@rollup/rollup-linux-x64-musl@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz#08f12e1965d6f27d6898ff932592121cca6abc4b" - integrity sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ== - -"@rollup/rollup-win32-arm64-msvc@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz#4a5dcbbe7af7d41cac92b09798e7c1831da1f599" - integrity sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g== - -"@rollup/rollup-win32-ia32-msvc@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz#075b0713de627843a73b4cf0e087c56b53e9d780" - integrity sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg== - -"@rollup/rollup-win32-x64-msvc@4.18.1": - version "4.18.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz#0cb240c147c0dfd0e3eaff4cc060a772d39e155c" - integrity sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw== +"@rollup/rollup-android-arm-eabi@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz#e3c9cc13f144ba033df4d2c3130a214dc8e3473e" + integrity sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw== + +"@rollup/rollup-android-arm64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz#0474250fcb5871aca952e249a0c3270fc4310b55" + integrity sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA== + +"@rollup/rollup-darwin-arm64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz#77c29b4f9c430c1624f1a6835f2a7e82be3d16f2" + integrity sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q== + +"@rollup/rollup-darwin-x64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz#7d87711f641a458868758cbf110fb32eabd6a25a" + integrity sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ== + +"@rollup/rollup-freebsd-arm64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz#662f808d2780e4e91021ac9ee7ed800862bb9a57" + integrity sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw== + +"@rollup/rollup-freebsd-x64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz#71e5a7bcfcbe51d8b65d158675acec1307edea79" + integrity sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA== + +"@rollup/rollup-linux-arm-gnueabihf@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz#08f67fcec61ee18f8b33b3f403a834ab8f3aa75d" + integrity sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w== + +"@rollup/rollup-linux-arm-musleabihf@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz#2e1ad4607f86475b1731556359c6070eb8f4b109" + integrity sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A== + +"@rollup/rollup-linux-arm64-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz#c65d559dcb0d3dabea500cf7b8215959ae6cccf8" + integrity sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg== + +"@rollup/rollup-linux-arm64-musl@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz#6739f7eb33e20466bb88748519c98ce8dee23922" + integrity sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz#8d9fe9471c256e55278cb1f7b1c977cd8fe6df20" + integrity sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ== + +"@rollup/rollup-linux-riscv64-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz#9a467f7ad5b61c9d66b24e79a3c57cb755d02c35" + integrity sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw== + +"@rollup/rollup-linux-s390x-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz#efaddf22df27b87a267a731fbeb9539e92cd4527" + integrity sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg== + +"@rollup/rollup-linux-x64-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz#a959eccb04b07fd1591d7ff745a6865faa7042cd" + integrity sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q== + +"@rollup/rollup-linux-x64-musl@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz#927764f1da1f2dd50943716dec93796d10cb6e99" + integrity sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw== + +"@rollup/rollup-win32-arm64-msvc@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz#030b6cc607d845da23dced624e47fb45de105840" + integrity sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A== + +"@rollup/rollup-win32-ia32-msvc@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz#3457a3f44a84f51d8097c3606429e01f0d2d0ec2" + integrity sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ== + +"@rollup/rollup-win32-x64-msvc@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz#67d516613c9f2fe42e2d8b78e252d0003179d92c" + integrity sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug== "@safe-global/safe-core-sdk-types@^1.9.2": version "1.10.1" @@ -4950,7 +4960,12 @@ dependencies: "@types/bn.js" "*" -"@types/estree@1.0.5", "@types/estree@^1.0.0": +"@types/estree@1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + +"@types/estree@^1.0.0": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== @@ -10223,11 +10238,16 @@ pgpass@1.x: dependencies: split2 "^4.1.0" -picocolors@^1.0.0, picocolors@^1.0.1: +picocolors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -10327,14 +10347,14 @@ possible-typed-array-names@^1.0.0: resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== -postcss@^8.4.39: - version "8.4.39" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.39.tgz#aa3c94998b61d3a9c259efa51db4b392e1bde0e3" - integrity sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw== +postcss@^8.4.43: + version "8.4.49" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19" + integrity sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA== dependencies: nanoid "^3.3.7" - picocolors "^1.0.1" - source-map-js "^1.2.0" + picocolors "^1.1.1" + source-map-js "^1.2.1" postgres-array@~2.0.0: version "2.0.0" @@ -10909,29 +10929,31 @@ rlp@^2.2.3, rlp@^2.2.4, rlp@^2.2.7: dependencies: bn.js "^5.2.0" -rollup@^4.13.0: - version "4.18.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.18.1.tgz#18a606df5e76ca53b8a69f2d8eab256d69dda851" - integrity sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A== +rollup@^4.20.0: + version "4.27.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.27.4.tgz#b23e4ef4fe4d0d87f5237dacf63f95a499503897" + integrity sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw== dependencies: - "@types/estree" "1.0.5" + "@types/estree" "1.0.6" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.18.1" - "@rollup/rollup-android-arm64" "4.18.1" - "@rollup/rollup-darwin-arm64" "4.18.1" - "@rollup/rollup-darwin-x64" "4.18.1" - "@rollup/rollup-linux-arm-gnueabihf" "4.18.1" - "@rollup/rollup-linux-arm-musleabihf" "4.18.1" - "@rollup/rollup-linux-arm64-gnu" "4.18.1" - "@rollup/rollup-linux-arm64-musl" "4.18.1" - "@rollup/rollup-linux-powerpc64le-gnu" "4.18.1" - "@rollup/rollup-linux-riscv64-gnu" "4.18.1" - "@rollup/rollup-linux-s390x-gnu" "4.18.1" - "@rollup/rollup-linux-x64-gnu" "4.18.1" - "@rollup/rollup-linux-x64-musl" "4.18.1" - "@rollup/rollup-win32-arm64-msvc" "4.18.1" - "@rollup/rollup-win32-ia32-msvc" "4.18.1" - "@rollup/rollup-win32-x64-msvc" "4.18.1" + "@rollup/rollup-android-arm-eabi" "4.27.4" + "@rollup/rollup-android-arm64" "4.27.4" + "@rollup/rollup-darwin-arm64" "4.27.4" + "@rollup/rollup-darwin-x64" "4.27.4" + "@rollup/rollup-freebsd-arm64" "4.27.4" + "@rollup/rollup-freebsd-x64" "4.27.4" + "@rollup/rollup-linux-arm-gnueabihf" "4.27.4" + "@rollup/rollup-linux-arm-musleabihf" "4.27.4" + "@rollup/rollup-linux-arm64-gnu" "4.27.4" + "@rollup/rollup-linux-arm64-musl" "4.27.4" + "@rollup/rollup-linux-powerpc64le-gnu" "4.27.4" + "@rollup/rollup-linux-riscv64-gnu" "4.27.4" + "@rollup/rollup-linux-s390x-gnu" "4.27.4" + "@rollup/rollup-linux-x64-gnu" "4.27.4" + "@rollup/rollup-linux-x64-musl" "4.27.4" + "@rollup/rollup-win32-arm64-msvc" "4.27.4" + "@rollup/rollup-win32-ia32-msvc" "4.27.4" + "@rollup/rollup-win32-x64-msvc" "4.27.4" fsevents "~2.3.2" run-parallel@^1.1.9: @@ -11120,6 +11142,11 @@ source-map-js@^1.2.0: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== + source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -11213,7 +11240,16 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -11245,7 +11281,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -11912,13 +11955,13 @@ vite-node@2.0.3: vite "^5.0.0" vite@^5.0.0: - version "5.3.4" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.3.4.tgz#b36ebd47c8a5e3a8727046375d5f10bf9fdf8715" - integrity sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA== + version "5.4.11" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.11.tgz#3b415cd4aed781a356c1de5a9ebafb837715f6e5" + integrity sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q== dependencies: esbuild "^0.21.3" - postcss "^8.4.39" - rollup "^4.13.0" + postcss "^8.4.43" + rollup "^4.20.0" optionalDependencies: fsevents "~2.3.3" @@ -12271,7 +12314,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -12289,6 +12332,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From d8f1ed9c0b0bd016c1a5d44ab25bc7067c0f5a6b Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Mon, 2 Dec 2024 21:52:31 +0800 Subject: [PATCH 17/44] chore: Add clientId to health check (#785) * chore: Return clientId in health check * bump axios * full client ID --- package.json | 2 +- src/server/routes/system/health.ts | 3 +++ yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2fd12d0fe..371ab1621 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "schema": "./src/prisma/schema.prisma" }, "resolutions": { - "@thirdweb-dev/auth/**/axios": ">=1.7.4", + "@thirdweb-dev/auth/**/axios": ">=1.7.8", "@thirdweb-dev/auth/**/web3-utils": ">=4.2.1", "ethers-gcp-kms-signer/**/protobufjs": ">=7.2.5", "fastify/**/find-my-way": ">=8.2.2", diff --git a/src/server/routes/system/health.ts b/src/server/routes/system/health.ts index 896dab30d..2106aecae 100644 --- a/src/server/routes/system/health.ts +++ b/src/server/routes/system/health.ts @@ -4,6 +4,7 @@ import { StatusCodes } from "http-status-codes"; import { isDatabaseReachable } from "../../../db/client"; import { env } from "../../../utils/env"; import { isRedisReachable } from "../../../utils/redis/redis"; +import { thirdwebClientId } from "../../../utils/sdk"; import { createCustomError } from "../../middleware/error"; type EngineFeature = @@ -26,6 +27,7 @@ const ReplySchemaOk = Type.Object({ Type.Literal("SMART_BACKEND_WALLETS"), ]), ), + clientId: Type.String(), }); const ReplySchemaError = Type.Object({ @@ -73,6 +75,7 @@ export async function healthCheck(fastify: FastifyInstance) { engineVersion: env.ENGINE_VERSION, engineTier: env.ENGINE_TIER ?? "SELF_HOSTED", features: getFeatures(), + clientId: thirdwebClientId, }); }, }); diff --git a/yarn.lock b/yarn.lock index bc76d8502..569cc4fcc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6086,10 +6086,10 @@ aws4fetch@1.0.18: resolved "https://registry.yarnpkg.com/aws4fetch/-/aws4fetch-1.0.18.tgz#417079ed66383cdd5875e04e9a1ff460917f3896" integrity sha512-3Cf+YaUl07p24MoQ46rFwulAmiyCwH2+1zw1ZyPAX5OtJ34Hh185DwB8y/qRLb6cYYYtSFJ9pthyLc0MD4e8sQ== -axios@>=1.7.4, axios@^0.21.0, axios@^0.27.2: - version "1.7.7" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" - integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== +axios@>=1.7.8, axios@^0.21.0, axios@^0.27.2: + version "1.7.8" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.8.tgz#1997b1496b394c21953e68c14aaa51b7b5de3d6e" + integrity sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" From 56a9b3b0f998abfc0cb3aff82072fcaef55d6bdf Mon Sep 17 00:00:00 2001 From: Prithvish Baidya Date: Tue, 3 Dec 2024 00:58:46 +0530 Subject: [PATCH 18/44] feat: add support for gasPrice in transaction overrides and schemas (#784) * feat: add support for gasPrice in transaction overrides and schemas * remove debug log statements for gas price in sendTransactionWorker --- src/server/schemas/transaction/index.ts | 2 +- src/server/schemas/txOverrides.ts | 7 +++++-- src/server/utils/transactionOverrides.ts | 1 + src/utils/transaction/types.ts | 1 + src/worker/tasks/sendTransactionWorker.ts | 2 ++ 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/server/schemas/transaction/index.ts b/src/server/schemas/transaction/index.ts index 0db9dae34..c9dd5500c 100644 --- a/src/server/schemas/transaction/index.ts +++ b/src/server/schemas/transaction/index.ts @@ -266,7 +266,7 @@ export const toTransactionSchema = ( if (transaction.status === "sent") { return transaction.gasPrice?.toString() ?? null; } - return null; + return transaction.overrides?.gasPrice?.toString() ?? null; }; const resolveMaxFeePerGas = (): string | null => { diff --git a/src/server/schemas/txOverrides.ts b/src/server/schemas/txOverrides.ts index 04a59a916..cef4a1574 100644 --- a/src/server/schemas/txOverrides.ts +++ b/src/server/schemas/txOverrides.ts @@ -10,8 +10,11 @@ export const txOverridesSchema = Type.Object({ description: "Gas limit for the transaction", }), - // Overriding `gasPrice` is currently not supported. - + gasPrice: Type.Optional({ + ...WeiAmountStringSchema, + description: + "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", + }), maxFeePerGas: Type.Optional({ ...WeiAmountStringSchema, description: "Maximum fee per gas", diff --git a/src/server/utils/transactionOverrides.ts b/src/server/utils/transactionOverrides.ts index f97d784f5..a048504ed 100644 --- a/src/server/utils/transactionOverrides.ts +++ b/src/server/utils/transactionOverrides.ts @@ -18,6 +18,7 @@ export const parseTransactionOverrides = ( return { overrides: { gas: maybeBigInt(overrides.gas), + gasPrice: maybeBigInt(overrides.gasPrice), maxFeePerGas: maybeBigInt(overrides.maxFeePerGas), maxPriorityFeePerGas: maybeBigInt(overrides.maxPriorityFeePerGas), }, diff --git a/src/utils/transaction/types.ts b/src/utils/transaction/types.ts index c4591ce8f..238c71bde 100644 --- a/src/utils/transaction/types.ts +++ b/src/utils/transaction/types.ts @@ -28,6 +28,7 @@ export type InsertedTransaction = { // User-provided overrides. overrides?: { gas?: bigint; + gasPrice?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 803de187b..c83b3736f 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -320,6 +320,7 @@ const _sendTransaction = async ( // Apply gas setting overrides. // Do not set `maxFeePerGas` to estimate the onchain value. gas: overrides?.gas, + gasPrice: overrides?.gasPrice, maxPriorityFeePerGas: overrides?.maxPriorityFeePerGas, }, }); @@ -403,6 +404,7 @@ const _sendTransaction = async ( } await addSentNonce(chainId, from, nonce); + return { ...queuedTransaction, status: "sent", From 789340a9b7cfe36e82d3022885d1f352b5ec031b Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 3 Dec 2024 17:34:50 +0800 Subject: [PATCH 19/44] feat: allow resetting the nonce for a single wallet (#786) * feat: allow resetting the nonce for a single wallet * fix build * add body --- src/db/wallets/walletNonce.ts | 23 ++--- .../routes/backend-wallet/reset-nonces.ts | 96 +++++++++++++++++++ .../routes/backend-wallet/resetNonces.ts | 78 --------------- src/server/routes/index.ts | 4 +- 4 files changed, 110 insertions(+), 91 deletions(-) create mode 100644 src/server/routes/backend-wallet/reset-nonces.ts delete mode 100644 src/server/routes/backend-wallet/resetNonces.ts diff --git a/src/db/wallets/walletNonce.ts b/src/db/wallets/walletNonce.ts index 041b7d58b..1d7124bd8 100644 --- a/src/db/wallets/walletNonce.ts +++ b/src/db/wallets/walletNonce.ts @@ -250,18 +250,19 @@ export const inspectNonce = async (chainId: number, walletAddress: Address) => { }; /** - * Delete all wallet nonces. Useful when they get out of sync. + * Delete nonce state for the provided wallets. + * @param backendWallets */ -export const deleteAllNonces = async () => { - const keys = [ - ...(await redis.keys("nonce:*")), - ...(await redis.keys("nonce-recycled:*")), - ...(await redis.keys("sent-nonce:*")), - ]; - if (keys.length > 0) { - await redis.del(keys); - } -}; +export async function deleteNoncesForBackendWallets( + backendWallets: { chainId: number; walletAddress: Address }[], +) { + const keys = backendWallets.flatMap(({ chainId, walletAddress }) => [ + lastUsedNonceKey(chainId, walletAddress), + recycledNoncesKey(chainId, walletAddress), + sentNoncesKey(chainId, walletAddress), + ]); + await redis.del(keys); +} /** * Resync the nonce to the higher of (db nonce, onchain nonce). diff --git a/src/server/routes/backend-wallet/reset-nonces.ts b/src/server/routes/backend-wallet/reset-nonces.ts new file mode 100644 index 000000000..0ec4c30e8 --- /dev/null +++ b/src/server/routes/backend-wallet/reset-nonces.ts @@ -0,0 +1,96 @@ +import { Type, type Static } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; +import { StatusCodes } from "http-status-codes"; +import { getAddress } from "thirdweb"; +import { + deleteNoncesForBackendWallets, + getUsedBackendWallets, + syncLatestNonceFromOnchain, +} from "../../../db/wallets/walletNonce"; +import { AddressSchema } from "../../schemas/address"; +import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; + +const requestBodySchema = Type.Object({ + chainId: Type.Optional( + Type.Number({ + description: "The chain ID to reset nonces for.", + }), + ), + walletAddress: Type.Optional({ + ...AddressSchema, + description: + "The backend wallet address to reset nonces for. Omit to reset all backend wallets.", + }), +}); + +const responseSchema = Type.Object({ + result: Type.Object({ + status: Type.String(), + count: Type.Number({ + description: "The number of backend wallets processed.", + }), + }), +}); + +responseSchema.example = { + result: { + status: "success", + count: 1, + }, +}; + +export const resetBackendWalletNoncesRoute = async ( + fastify: FastifyInstance, +) => { + fastify.route<{ + Reply: Static; + Body: Static; + }>({ + method: "POST", + url: "/backend-wallet/reset-nonces", + schema: { + summary: "Reset nonces", + description: + "Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens.", + tags: ["Backend Wallet"], + operationId: "resetNonces", + body: requestBodySchema, + response: { + ...standardResponseSchema, + [StatusCodes.OK]: responseSchema, + }, + }, + handler: async (req, reply) => { + const { chainId, walletAddress: _walletAddress } = req.body; + + // If chain+wallet are provided, only process that wallet. + // Otherwise process all used wallets that has nonce state. + const backendWallets = + chainId && _walletAddress + ? [{ chainId, walletAddress: getAddress(_walletAddress) }] + : await getUsedBackendWallets(); + + const RESYNC_BATCH_SIZE = 50; + for (let i = 0; i < backendWallets.length; i += RESYNC_BATCH_SIZE) { + const batch = backendWallets.slice(i, i + RESYNC_BATCH_SIZE); + + // Delete nonce state for these backend wallets. + await deleteNoncesForBackendWallets(backendWallets); + + // Resync nonces for these backend wallets. + await Promise.allSettled( + batch.map(({ chainId, walletAddress }) => + syncLatestNonceFromOnchain(chainId, walletAddress), + ), + ); + } + + reply.status(StatusCodes.OK).send({ + result: { + status: "success", + count: backendWallets.length, + }, + }); + }, + }); +}; diff --git a/src/server/routes/backend-wallet/resetNonces.ts b/src/server/routes/backend-wallet/resetNonces.ts deleted file mode 100644 index 8a7690637..000000000 --- a/src/server/routes/backend-wallet/resetNonces.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; -import { StatusCodes } from "http-status-codes"; -import { Address, getAddress } from "thirdweb"; -import { - deleteAllNonces, - syncLatestNonceFromOnchain, -} from "../../../db/wallets/walletNonce"; -import { redis } from "../../../utils/redis/redis"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; - -const responseSchema = Type.Object({ - result: Type.Object({ - status: Type.String(), - }), -}); - -responseSchema.example = { - result: { - status: "success", - }, -}; - -export const resetBackendWalletNonces = async (fastify: FastifyInstance) => { - fastify.route<{ - Reply: Static; - }>({ - method: "POST", - url: "/backend-wallet/reset-nonces", - schema: { - summary: "Reset nonces", - description: - "Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens.", - tags: ["Backend Wallet"], - operationId: "resetNonces", - response: { - ...standardResponseSchema, - [StatusCodes.OK]: responseSchema, - }, - }, - handler: async (req, reply) => { - const backendWallets = await getUsedBackendWallets(); - - // Delete all nonce state for used backend wallets. - await deleteAllNonces(); - - // Attempt to re-sync nonces for used backend wallets. - await Promise.allSettled( - backendWallets.map(({ chainId, walletAddress }) => - syncLatestNonceFromOnchain(chainId, walletAddress), - ), - ); - - reply.status(StatusCodes.OK).send({ - result: { - status: "success", - }, - }); - }, - }); -}; - -// TODO: replace with getUsedBackendWallets() helper. -const getUsedBackendWallets = async (): Promise< - { - chainId: number; - walletAddress: Address; - }[] -> => { - const keys = await redis.keys("nonce:*:*"); - return keys.map((key) => { - const tokens = key.split(":"); - return { - chainId: parseInt(tokens[1]), - walletAddress: getAddress(tokens[2]), - }; - }); -}; diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index 4345859ca..2f56406d9 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -19,7 +19,7 @@ import { getTransactionsForBackendWallet } from "./backend-wallet/getTransaction import { getTransactionsForBackendWalletByNonce } from "./backend-wallet/getTransactionsByNonce"; import { importBackendWallet } from "./backend-wallet/import"; import { removeBackendWallet } from "./backend-wallet/remove"; -import { resetBackendWalletNonces } from "./backend-wallet/resetNonces"; +import { resetBackendWalletNoncesRoute } from "./backend-wallet/reset-nonces"; import { sendTransaction } from "./backend-wallet/sendTransaction"; import { sendTransactionBatch } from "./backend-wallet/sendTransactionBatch"; import { signMessageRoute } from "./backend-wallet/signMessage"; @@ -128,7 +128,7 @@ export async function withRoutes(fastify: FastifyInstance) { await fastify.register(signTypedData); await fastify.register(getTransactionsForBackendWallet); await fastify.register(getTransactionsForBackendWalletByNonce); - await fastify.register(resetBackendWalletNonces); + await fastify.register(resetBackendWalletNoncesRoute); await fastify.register(getBackendWalletNonce); await fastify.register(simulateTransaction); From a364d405e5a377199bf1dd29cbbe0671d06b06ba Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 3 Dec 2024 23:01:22 +0800 Subject: [PATCH 20/44] fix: Support up to 200 char limit for idempotency key (#787) --- src/server/index.ts | 1 + src/server/schemas/wallet/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/server/index.ts b/src/server/index.ts index 8686aa63c..0db3b366b 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -65,6 +65,7 @@ export const initServer = async () => { // Start the server with middleware. const server: FastifyInstance = fastify({ + maxParamLength: 200, connectionTimeout: SERVER_CONNECTION_TIMEOUT, disableRequestLogging: true, trustProxy, diff --git a/src/server/schemas/wallet/index.ts b/src/server/schemas/wallet/index.ts index cd2c4d024..c4119fa61 100644 --- a/src/server/schemas/wallet/index.ts +++ b/src/server/schemas/wallet/index.ts @@ -12,6 +12,7 @@ export const walletHeaderSchema = Type.Object({ }, "x-idempotency-key": Type.Optional( Type.String({ + maxLength: 200, description: `Transactions submitted with the same idempotency key will be de-duplicated. Only the last ${env.TRANSACTION_HISTORY_COUNT} transactions are compared.`, }), ), From a52a717733ddfd00936a9b2e814554ab6040bc82 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Wed, 4 Dec 2024 16:22:11 +0800 Subject: [PATCH 21/44] feat: cancel nonces endpoint (#788) * feat: cancel nonces endpoint * remove exception --- .../routes/backend-wallet/cancel-nonces.ts | 107 ++++++++++++++++++ src/server/routes/index.ts | 3 + src/server/routes/transaction/getAll.ts | 2 +- src/worker/tasks/nonceResyncWorker.ts | 2 +- 4 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 src/server/routes/backend-wallet/cancel-nonces.ts diff --git a/src/server/routes/backend-wallet/cancel-nonces.ts b/src/server/routes/backend-wallet/cancel-nonces.ts new file mode 100644 index 000000000..cb4f6cf73 --- /dev/null +++ b/src/server/routes/backend-wallet/cancel-nonces.ts @@ -0,0 +1,107 @@ +import { Type, type Static } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; +import { StatusCodes } from "http-status-codes"; +import { eth_getTransactionCount, getRpcClient } from "thirdweb"; +import { checksumAddress } from "thirdweb/utils"; +import { getChain } from "../../../utils/chain"; +import { thirdwebClient } from "../../../utils/sdk"; +import { sendCancellationTransaction } from "../../../utils/transaction/cancelTransaction"; +import { + requestQuerystringSchema, + standardResponseSchema, +} from "../../schemas/sharedApiSchemas"; +import { + walletChainParamSchema, + walletHeaderSchema, +} from "../../schemas/wallet"; +import { getChainIdFromChain } from "../../utils/chain"; + +const requestSchema = walletChainParamSchema; + +const requestBodySchema = Type.Object({ + toNonce: Type.Number({ + description: + "The nonce to cancel up to, inclusive. Example: If the onchain nonce is 10 and 'toNonce' is 15, this request will cancel nonces: 11, 12, 13, 14, 15", + examples: ["42"], + }), +}); + +const responseBodySchema = Type.Object({ + result: Type.Object( + { + cancelledNonces: Type.Array(Type.Number()), + }, + { + examples: [ + { + result: { + cancelledNonces: [11, 12, 13, 14, 15], + }, + }, + ], + }, + ), +}); + +export async function cancelBackendWalletNoncesRoute(fastify: FastifyInstance) { + fastify.route<{ + Params: Static; + Reply: Static; + Body: Static; + Querystring: Static; + }>({ + method: "POST", + url: "/backend-wallet/:chain/cancel-nonces", + schema: { + summary: "Cancel nonces", + description: + "Cancel all nonces up to the provided nonce. This is useful to unblock a backend wallet that has transactions waiting for nonces to be mined.", + tags: ["Backend Wallet"], + operationId: "cancelNonces", + params: requestSchema, + body: requestBodySchema, + headers: walletHeaderSchema, + querystring: requestQuerystringSchema, + response: { + ...standardResponseSchema, + [StatusCodes.OK]: responseBodySchema, + }, + }, + handler: async (request, reply) => { + const { chain } = request.params; + const { toNonce } = request.body; + const { "x-backend-wallet-address": walletAddress } = + request.headers as Static; + + const chainId = await getChainIdFromChain(chain); + const from = checksumAddress(walletAddress); + + const rpcRequest = getRpcClient({ + client: thirdwebClient, + chain: await getChain(chainId), + }); + + // Cancel starting from the next unused onchain nonce. + const transactionCount = await eth_getTransactionCount(rpcRequest, { + address: walletAddress, + blockTag: "latest", + }); + + const cancelledNonces: number[] = []; + for (let nonce = transactionCount; nonce <= toNonce; nonce++) { + await sendCancellationTransaction({ + chainId, + from, + nonce, + }); + cancelledNonces.push(nonce); + } + + reply.status(StatusCodes.OK).send({ + result: { + cancelledNonces, + }, + }); + }, + }); +} diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index 2f56406d9..1d6694a98 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -11,6 +11,7 @@ import { removePublicKey } from "./auth/keypair/remove"; import { getAllPermissions } from "./auth/permissions/getAll"; import { grantPermissions } from "./auth/permissions/grant"; import { revokePermissions } from "./auth/permissions/revoke"; +import { cancelBackendWalletNoncesRoute } from "./backend-wallet/cancel-nonces"; import { createBackendWallet } from "./backend-wallet/create"; import { getAll } from "./backend-wallet/getAll"; import { getBalance } from "./backend-wallet/getBalance"; @@ -129,6 +130,8 @@ export async function withRoutes(fastify: FastifyInstance) { await fastify.register(getTransactionsForBackendWallet); await fastify.register(getTransactionsForBackendWalletByNonce); await fastify.register(resetBackendWalletNoncesRoute); + await fastify.register(cancelBackendWalletNoncesRoute); + await fastify.register(resetBackendWalletNoncesRoute); await fastify.register(getBackendWalletNonce); await fastify.register(simulateTransaction); diff --git a/src/server/routes/transaction/getAll.ts b/src/server/routes/transaction/getAll.ts index d8c023167..5b58f5b3e 100644 --- a/src/server/routes/transaction/getAll.ts +++ b/src/server/routes/transaction/getAll.ts @@ -27,7 +27,7 @@ const requestQuerySchema = Type.Object({ ), }); -export const responseBodySchema = Type.Object({ +const responseBodySchema = Type.Object({ result: Type.Object({ transactions: Type.Array(TransactionSchema), totalCount: Type.Integer(), diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonceResyncWorker.ts index 9a0642250..8f5cb0c65 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -40,7 +40,7 @@ export const initNonceResyncWorker = async () => { * This is to unblock a wallet that has been stuck due to one or more skipped nonces. */ const handler: Processor = async (job: Job) => { - const sentNoncesKeys = await redis.keys("nonce-sent*"); + const sentNoncesKeys = await redis.keys("nonce-sent:*"); if (sentNoncesKeys.length === 0) { job.log("No active wallets."); return; From 1dd938f05b65ea760b53fbecd2f42d23ab49936e Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Wed, 4 Dec 2024 17:11:32 +0800 Subject: [PATCH 22/44] fix: remove extra route causing build error (#789) --- src/server/routes/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index 1d6694a98..b16ded326 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -131,7 +131,6 @@ export async function withRoutes(fastify: FastifyInstance) { await fastify.register(getTransactionsForBackendWalletByNonce); await fastify.register(resetBackendWalletNoncesRoute); await fastify.register(cancelBackendWalletNoncesRoute); - await fastify.register(resetBackendWalletNoncesRoute); await fastify.register(getBackendWalletNonce); await fastify.register(simulateTransaction); From 313f1c768dbc48adf4ffe11eef771c76824aee4e Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Wed, 4 Dec 2024 18:11:44 +0800 Subject: [PATCH 23/44] fix: load latest config when checking origin for CORS (#790) * fix: return proper response on CORS error * remove debug logging * remove comment * return 403 response again --- src/server/index.ts | 5 +---- src/server/middleware/cors.ts | 7 ++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/server/index.ts b/src/server/index.ts index 0db3b366b..4b6deb374 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -3,7 +3,6 @@ import fastify, { type FastifyInstance } from "fastify"; import * as fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; -import { getConfig } from "../utils/cache/getConfig"; import { clearCacheCron } from "../utils/cron/clearCacheCron"; import { env } from "../utils/env"; import { logger } from "../utils/logger"; @@ -72,13 +71,11 @@ export const initServer = async () => { ...(env.ENABLE_HTTPS ? httpsObject : {}), }).withTypeProvider(); - const config = await getConfig(); - // Configure middleware withErrorHandler(server); withRequestLogs(server); withSecurityHeaders(server); - withCors(server, config); + withCors(server); withRateLimit(server); withEnforceEngineMode(server); withServerUsageReporting(server); diff --git a/src/server/middleware/cors.ts b/src/server/middleware/cors.ts index be1e6eca6..ce9997a52 100644 --- a/src/server/middleware/cors.ts +++ b/src/server/middleware/cors.ts @@ -1,5 +1,5 @@ import type { FastifyInstance } from "fastify"; -import type { ParsedConfig } from "../../schema/config"; +import { getConfig } from "../../utils/cache/getConfig"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; const STANDARD_METHODS = "GET,POST,DELETE,PUT,PATCH,HEAD,PUT,PATCH,POST,DELETE"; @@ -9,7 +9,7 @@ const DEFAULT_ALLOWED_HEADERS = [ "ngrok-skip-browser-warning", ]; -export function withCors(server: FastifyInstance, config: ParsedConfig) { +export function withCors(server: FastifyInstance) { server.addHook("onRequest", async (request, reply) => { const origin = request.headers.origin; @@ -29,6 +29,7 @@ export function withCors(server: FastifyInstance, config: ParsedConfig) { return; } + const config = await getConfig(); const allowedOrigins = config.accessControlAllowOrigin .split(",") .map(sanitizeOrigin); @@ -56,7 +57,7 @@ export function withCors(server: FastifyInstance, config: ParsedConfig) { return; } } else { - reply.code(403).send({ error: "Invalid origin" }); + reply.code(403).send({ error: "Invalid origin." }); return; } }); From af85f618b7c672d8ca05f4f29c6077805effa712 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Fri, 6 Dec 2024 10:51:12 +0800 Subject: [PATCH 24/44] feat: Allow retrying a failed userop (#783) * feat: Allow retrying a failed userop * use transaction receipt helpers * query hashes in batches * linting * lint * set queuedAt to now --- .../transaction/get-transaction-receipt.ts | 73 +++++++++ src/server/routes/index.ts | 8 +- src/server/routes/transaction/retry-failed.ts | 78 ++++----- .../{syncRetry.ts => sync-retry.ts} | 15 +- src/utils/transaction/types.ts | 2 - src/worker/tasks/mineTransactionWorker.ts | 151 ++++++++---------- src/worker/tasks/sendTransactionWorker.ts | 19 +-- test/e2e/tests/routes/write.test.ts | 4 +- 8 files changed, 186 insertions(+), 164 deletions(-) create mode 100644 src/lib/transaction/get-transaction-receipt.ts rename src/server/routes/transaction/{syncRetry.ts => sync-retry.ts} (90%) diff --git a/src/lib/transaction/get-transaction-receipt.ts b/src/lib/transaction/get-transaction-receipt.ts new file mode 100644 index 000000000..b95e108c8 --- /dev/null +++ b/src/lib/transaction/get-transaction-receipt.ts @@ -0,0 +1,73 @@ +import assert from "node:assert"; +import { eth_getTransactionReceipt, getRpcClient } from "thirdweb"; +import type { UserOperationReceipt } from "thirdweb/dist/types/wallets/smart/types"; +import type { TransactionReceipt } from "thirdweb/transaction"; +import { getUserOpReceiptRaw } from "thirdweb/wallets/smart"; +import { getChain } from "../../utils/chain"; +import { thirdwebClient } from "../../utils/sdk"; +import type { AnyTransaction } from "../../utils/transaction/types"; + +/** + * Returns the transaction receipt for a given transaction, or null if not found. + * @param transaction + * @returns TransactionReceipt | null + */ +export async function getReceiptForEOATransaction( + transaction: AnyTransaction, +): Promise { + assert(!transaction.isUserOp); + + if (!("sentTransactionHashes" in transaction)) { + return null; + } + + const rpcRequest = getRpcClient({ + client: thirdwebClient, + chain: await getChain(transaction.chainId), + }); + + // Get the receipt for each transaction hash (in batches). + // Return if any receipt is found. + const BATCH_SIZE = 10; + for ( + let i = 0; + i < transaction.sentTransactionHashes.length; + i += BATCH_SIZE + ) { + const batch = transaction.sentTransactionHashes.slice(i, i + BATCH_SIZE); + const results = await Promise.allSettled( + batch.map((hash) => eth_getTransactionReceipt(rpcRequest, { hash })), + ); + + for (const result of results) { + if (result.status === "fulfilled") { + return result.value; + } + } + } + + return null; +} + +/** + * Returns the user operation receipt for a given transaction, or null if not found. + * The transaction receipt is available in the result under `result.receipt`. + * @param transaction + * @returns UserOperationReceipt | null + */ +export async function getReceiptForUserOp( + transaction: AnyTransaction, +): Promise { + assert(transaction.isUserOp); + + if (!("userOpHash" in transaction)) { + return null; + } + + const receipt = await getUserOpReceiptRaw({ + client: thirdwebClient, + chain: await getChain(transaction.chainId), + userOpHash: transaction.userOpHash, + }); + return receipt ?? null; +} diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index b16ded326..173698fea 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -103,9 +103,9 @@ import { cancelTransaction } from "./transaction/cancel"; import { getAllTransactions } from "./transaction/getAll"; import { getAllDeployedContracts } from "./transaction/getAllDeployedContracts"; import { retryTransaction } from "./transaction/retry"; -import { retryFailedTransaction } from "./transaction/retry-failed"; +import { retryFailedTransactionRoute } from "./transaction/retry-failed"; import { checkTxStatus } from "./transaction/status"; -import { syncRetryTransaction } from "./transaction/syncRetry"; +import { syncRetryTransactionRoute } from "./transaction/sync-retry"; import { createWebhookRoute } from "./webhooks/create"; import { getWebhooksEventTypes } from "./webhooks/events"; import { getAllWebhooksData } from "./webhooks/getAll"; @@ -224,8 +224,8 @@ export async function withRoutes(fastify: FastifyInstance) { await fastify.register(checkTxStatus); await fastify.register(getAllDeployedContracts); await fastify.register(retryTransaction); - await fastify.register(syncRetryTransaction); - await fastify.register(retryFailedTransaction); + await fastify.register(syncRetryTransactionRoute); + await fastify.register(retryFailedTransactionRoute); await fastify.register(cancelTransaction); await fastify.register(sendSignedTransaction); await fastify.register(sendSignedUserOp); diff --git a/src/server/routes/transaction/retry-failed.ts b/src/server/routes/transaction/retry-failed.ts index 0227f2ca3..5ac43c43b 100644 --- a/src/server/routes/transaction/retry-failed.ts +++ b/src/server/routes/transaction/retry-failed.ts @@ -1,10 +1,12 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { Type, type Static } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { eth_getTransactionReceipt, getRpcClient } from "thirdweb"; import { TransactionDB } from "../../../db/transactions/db"; -import { getChain } from "../../../utils/chain"; -import { thirdwebClient } from "../../../utils/sdk"; +import { + getReceiptForEOATransaction, + getReceiptForUserOp, +} from "../../../lib/transaction/get-transaction-receipt"; +import type { QueuedTransaction } from "../../../utils/transaction/types"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; @@ -26,13 +28,12 @@ export const responseBodySchema = Type.Object({ responseBodySchema.example = { result: { - message: - "Transaction queued for retry with queueId: a20ed4ce-301d-4251-a7af-86bd88f6c015", + message: "Sent transaction to be retried.", status: "success", }, }; -export async function retryFailedTransaction(fastify: FastifyInstance) { +export async function retryFailedTransactionRoute(fastify: FastifyInstance) { fastify.route<{ Body: Static; Reply: Static; @@ -63,69 +64,48 @@ export async function retryFailedTransaction(fastify: FastifyInstance) { } if (transaction.status !== "errored") { throw createCustomError( - `Transaction cannot be retried because status: ${transaction.status}`, + `Cannot retry a transaction with status ${transaction.status}.`, StatusCodes.BAD_REQUEST, "TRANSACTION_CANNOT_BE_RETRIED", ); } - if (transaction.isUserOp) { + const receipt = transaction.isUserOp + ? await getReceiptForUserOp(transaction) + : await getReceiptForEOATransaction(transaction); + if (receipt) { throw createCustomError( - "Transaction cannot be retried because it is a userop", + "Cannot retry a transaction that is already mined.", StatusCodes.BAD_REQUEST, "TRANSACTION_CANNOT_BE_RETRIED", ); } - const rpcRequest = getRpcClient({ - client: thirdwebClient, - chain: await getChain(transaction.chainId), - }); - - // if transaction has sentTransactionHashes, we need to check if any of them are mined - if ("sentTransactionHashes" in transaction) { - const receiptPromises = transaction.sentTransactionHashes.map( - (hash) => { - // if receipt is not found, it will throw an error - // so we catch it and return null - return eth_getTransactionReceipt(rpcRequest, { - hash, - }).catch(() => null); - }, - ); - - const receipts = await Promise.all(receiptPromises); - - // If any of the transactions are mined, we should not retry. - const minedReceipt = receipts.find((receipt) => !!receipt); - - if (minedReceipt) { - throw createCustomError( - `Transaction cannot be retried because it has already been mined with hash: ${minedReceipt.transactionHash}`, - StatusCodes.BAD_REQUEST, - "TRANSACTION_CANNOT_BE_RETRIED", - ); - } - } - + // Remove existing jobs. const sendJob = await SendTransactionQueue.q.getJob( SendTransactionQueue.jobId({ queueId: transaction.queueId, resendCount: 0, }), ); - if (sendJob) { - await sendJob.remove(); - } + await sendJob?.remove(); const mineJob = await MineTransactionQueue.q.getJob( MineTransactionQueue.jobId({ queueId: transaction.queueId, }), ); - if (mineJob) { - await mineJob.remove(); - } + await mineJob?.remove(); + + // Reset the failed job as "queued" and re-enqueue it. + const { errorMessage, ...omitted } = transaction; + const queuedTransaction: QueuedTransaction = { + ...omitted, + status: "queued", + queuedAt: new Date(), + resendCount: 0, + }; + await TransactionDB.set(queuedTransaction); await SendTransactionQueue.add({ queueId: transaction.queueId, @@ -134,7 +114,7 @@ export async function retryFailedTransaction(fastify: FastifyInstance) { reply.status(StatusCodes.OK).send({ result: { - message: `Transaction queued for retry with queueId: ${queueId}`, + message: "Sent transaction to be retried.", status: "success", }, }); diff --git a/src/server/routes/transaction/syncRetry.ts b/src/server/routes/transaction/sync-retry.ts similarity index 90% rename from src/server/routes/transaction/syncRetry.ts rename to src/server/routes/transaction/sync-retry.ts index 7185c2802..3eabdbd1e 100644 --- a/src/server/routes/transaction/syncRetry.ts +++ b/src/server/routes/transaction/sync-retry.ts @@ -3,6 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { toSerializableTransaction } from "thirdweb"; import { TransactionDB } from "../../../db/transactions/db"; +import { getReceiptForEOATransaction } from "../../../lib/transaction/get-transaction-receipt"; import { getAccount } from "../../../utils/account"; import { getBlockNumberish } from "../../../utils/block"; import { getChain } from "../../../utils/chain"; @@ -15,7 +16,6 @@ import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; -// INPUT const requestBodySchema = Type.Object({ queueId: Type.String({ description: "Transaction queue ID", @@ -25,7 +25,6 @@ const requestBodySchema = Type.Object({ maxPriorityFeePerGas: Type.Optional(Type.String()), }); -// OUTPUT export const responseBodySchema = Type.Object({ result: Type.Object({ transactionHash: TransactionHashSchema, @@ -39,7 +38,7 @@ responseBodySchema.example = { }, }; -export async function syncRetryTransaction(fastify: FastifyInstance) { +export async function syncRetryTransactionRoute(fastify: FastifyInstance) { fastify.route<{ Body: Static; Reply: Static; @@ -69,6 +68,7 @@ export async function syncRetryTransaction(fastify: FastifyInstance) { "TRANSACTION_NOT_FOUND", ); } + if (transaction.isUserOp || !("nonce" in transaction)) { throw createCustomError( "Transaction cannot be retried.", @@ -77,6 +77,15 @@ export async function syncRetryTransaction(fastify: FastifyInstance) { ); } + const receipt = await getReceiptForEOATransaction(transaction); + if (receipt) { + throw createCustomError( + "Cannot retry a transaction that is already mined.", + StatusCodes.BAD_REQUEST, + "TRANSACTION_CANNOT_BE_RETRIED", + ); + } + const { chainId, from } = transaction; // Prepare transaction. diff --git a/src/utils/transaction/types.ts b/src/utils/transaction/types.ts index 238c71bde..d4846a4a8 100644 --- a/src/utils/transaction/types.ts +++ b/src/utils/transaction/types.ts @@ -58,8 +58,6 @@ export type QueuedTransaction = InsertedTransaction & { queuedAt: Date; value: bigint; data?: Hex; - - manuallyResentAt?: Date; }; // SentTransaction has been submitted to RPC successfully. diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index bed88e803..1d3ce45f9 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -3,17 +3,19 @@ import assert from "node:assert"; import superjson from "superjson"; import { eth_getBalance, - eth_getTransactionByHash, - eth_getTransactionReceipt, getAddress, getRpcClient, toTokens, type Address, } from "thirdweb"; import { stringify } from "thirdweb/utils"; -import { getUserOpReceipt, getUserOpReceiptRaw } from "thirdweb/wallets/smart"; +import { getUserOpReceipt } from "thirdweb/wallets/smart"; import { TransactionDB } from "../../db/transactions/db"; import { recycleNonce, removeSentNonce } from "../../db/wallets/walletNonce"; +import { + getReceiptForEOATransaction, + getReceiptForUserOp, +} from "../../lib/transaction/get-transaction-receipt"; import { WebhooksEventTypes } from "../../schema/webhooks"; import { getBlockNumberish } from "../../utils/block"; import { getConfig } from "../../utils/cache/getConfig"; @@ -65,7 +67,6 @@ const handler: Processor = async (job: Job) => { } if (!resultTransaction) { - job.log("Transaction is not mined yet. Check again later..."); throw new Error("NOT_CONFIRMED_YET"); } @@ -121,72 +122,61 @@ const _mineTransaction = async ( ): Promise => { assert(!sentTransaction.isUserOp); - const { queueId, chainId, sentTransactionHashes, sentAtBlock, resendCount } = - sentTransaction; - - // Check all sent transaction hashes since any of them might succeed. - const rpcRequest = getRpcClient({ - client: thirdwebClient, - chain: await getChain(chainId), - }); - job.log(`Mining transactionHashes: ${sentTransactionHashes}`); - const receiptResults = await Promise.allSettled( - sentTransactionHashes.map((hash) => - eth_getTransactionReceipt(rpcRequest, { hash }), - ), - ); + const receipt = await getReceiptForEOATransaction(sentTransaction); - // This transaction is mined if any receipt is found. - for (const result of receiptResults) { - if (result.status === "fulfilled") { - const receipt = result.value; - job.log(`Found receipt on block ${receipt.blockNumber}.`); - - const removed = await removeSentNonce( - sentTransaction.chainId, - sentTransaction.from, - sentTransaction.nonce, - ); - - logger({ - level: "debug", - message: `[mineTransactionWorker] Removed nonce ${sentTransaction.nonce} from nonce-sent set: ${removed}`, - service: "worker", - }); + if (receipt) { + job.log( + `Found receipt. transactionHash=${receipt.transactionHash} block=${receipt.blockNumber}`, + ); - const errorMessage = - receipt.status === "reverted" - ? "The transaction failed onchain. See: https://portal.thirdweb.com/engine/troubleshooting" - : undefined; + const removed = await removeSentNonce( + sentTransaction.chainId, + sentTransaction.from, + sentTransaction.nonce, + ); + logger({ + level: "debug", + message: `[mineTransactionWorker] Removed nonce ${sentTransaction.nonce} from nonce-sent set: ${removed}`, + service: "worker", + }); - return { - ...sentTransaction, - status: "mined", - transactionHash: receipt.transactionHash, - minedAt: new Date(), - minedAtBlock: receipt.blockNumber, - transactionType: receipt.type, - onchainStatus: receipt.status, - gasUsed: receipt.gasUsed, - effectiveGasPrice: receipt.effectiveGasPrice, - cumulativeGasUsed: receipt.cumulativeGasUsed, - errorMessage, - }; - } + // Though the transaction is mined successfully, set an error message if the transaction failed onchain. + const errorMessage = + receipt.status === "reverted" + ? "The transaction failed onchain. See: https://portal.thirdweb.com/engine/troubleshooting" + : undefined; + + return { + ...sentTransaction, + status: "mined", + transactionHash: receipt.transactionHash, + minedAt: new Date(), + minedAtBlock: receipt.blockNumber, + transactionType: receipt.type, + onchainStatus: receipt.status, + gasUsed: receipt.gasUsed, + effectiveGasPrice: receipt.effectiveGasPrice, + cumulativeGasUsed: receipt.cumulativeGasUsed, + errorMessage, + }; } + // Else the transaction is not mined yet. + job.log( + `Transaction is not mined yet. Check again later. sentTransactionHashes=${sentTransaction.sentTransactionHashes}`, + ); // Resend the transaction (after some initial delay). const config = await getConfig(); - const blockNumber = await getBlockNumberish(chainId); - const ellapsedBlocks = blockNumber - sentAtBlock; + const blockNumber = await getBlockNumberish(sentTransaction.chainId); + const ellapsedBlocks = blockNumber - sentTransaction.sentAtBlock; if (ellapsedBlocks >= config.minEllapsedBlocksBeforeRetry) { job.log( - `Resending transaction after ${ellapsedBlocks} blocks. blockNumber=${blockNumber} sentAtBlock=${sentAtBlock}`, + `Resending transaction after ${ellapsedBlocks} blocks. blockNumber=${blockNumber} sentAtBlock=${sentTransaction.sentAtBlock}`, ); await SendTransactionQueue.add({ - queueId, - resendCount: resendCount + 1, + queueId: sentTransaction.queueId, + resendCount: sentTransaction.resendCount + 1, }); } @@ -199,47 +189,36 @@ const _mineUserOp = async ( ): Promise => { assert(sentTransaction.isUserOp); - const { chainId, userOpHash } = sentTransaction; - const chain = await getChain(chainId); - - job.log(`Mining userOpHash: ${userOpHash}`); - const userOpReceiptRaw = await getUserOpReceiptRaw({ - client: thirdwebClient, - chain, - userOpHash, - }); - - if (!userOpReceiptRaw) { + const userOpReceipt = await getReceiptForUserOp(sentTransaction); + if (!userOpReceipt) { + job.log( + `UserOp is not mined yet. Check again later. userOpHash=${sentTransaction.userOpHash}`, + ); return null; } + const { receipt } = userOpReceipt; - const { transactionHash } = userOpReceiptRaw.receipt; - job.log(`Found transactionHash: ${transactionHash}`); - - const rpcRequest = getRpcClient({ client: thirdwebClient, chain }); - const transaction = await eth_getTransactionByHash(rpcRequest, { - hash: transactionHash, - }); - const receipt = await eth_getTransactionReceipt(rpcRequest, { - hash: transaction.hash, - }); + job.log( + `Found receipt. transactionHash=${receipt.transactionHash} block=${receipt.blockNumber}`, + ); let errorMessage: string | undefined; // if the userOpReceipt is not successful, try to get the parsed userOpReceipt // we expect this to fail, but we want the error message if it does - if (!userOpReceiptRaw.success) { + if (!userOpReceipt.success) { try { + const chain = await getChain(sentTransaction.chainId); const userOpReceipt = await getUserOpReceipt({ client: thirdwebClient, chain, - userOpHash, + userOpHash: sentTransaction.userOpHash, }); - await job.log(`Found userOpReceipt: ${userOpReceipt}`); + job.log(`Found userOpReceipt: ${userOpReceipt}`); } catch (e) { if (e instanceof Error) { errorMessage = e.message; - await job.log(`Failed to get userOpReceipt: ${e.message}`); + job.log(`Failed to get userOpReceipt: ${e.message}`); } else { throw e; } @@ -253,13 +232,13 @@ const _mineUserOp = async ( minedAt: new Date(), minedAtBlock: receipt.blockNumber, transactionType: receipt.type, - onchainStatus: userOpReceiptRaw.success ? "success" : "reverted", + onchainStatus: userOpReceipt.success ? "success" : "reverted", gasUsed: receipt.gasUsed, effectiveGasPrice: receipt.effectiveGasPrice, gas: receipt.gasUsed, cumulativeGasUsed: receipt.cumulativeGasUsed, - sender: userOpReceiptRaw.sender as Address, - nonce: userOpReceiptRaw.nonce.toString(), + sender: userOpReceipt.sender as Address, + nonce: userOpReceipt.nonce.toString(), errorMessage, }; }; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index c83b3736f..783530ba0 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -68,29 +68,12 @@ const handler: Processor = async (job: Job) => { job.data, ); - let transaction = await TransactionDB.get(queueId); + const transaction = await TransactionDB.get(queueId); if (!transaction) { job.log(`Invalid transaction state: ${stringify(transaction)}`); return; } - // The transaction may be errored if it is manually retried. - // For example, the developer retried all failed transactions during an RPC outage. - // An errored queued transaction (resendCount = 0) is safe to retry: the transaction wasn't sent to RPC. - if (transaction.status === "errored" && resendCount === 0) { - const { errorMessage, ...omitted } = transaction; - transaction = { - ...omitted, - status: "queued", - resendCount: 0, - queueId: transaction.queueId, - queuedAt: transaction.queuedAt, - value: transaction.value, - data: transaction.data, - manuallyResentAt: new Date(), - } satisfies QueuedTransaction; - } - let resultTransaction: | SentTransaction // Transaction sent successfully. | ErroredTransaction // Transaction failed and will not be retried. diff --git a/test/e2e/tests/routes/write.test.ts b/test/e2e/tests/routes/write.test.ts index 1cad9a98d..d891055d6 100644 --- a/test/e2e/tests/routes/write.test.ts +++ b/test/e2e/tests/routes/write.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import assert from "node:assert"; -import { type Address, stringToHex } from "thirdweb"; +import { stringToHex, type Address } from "thirdweb"; import { zeroAddress } from "viem"; import type { ApiError } from "../../../../sdk/dist/thirdweb-dev-engine.cjs.js"; import { CONFIG } from "../../config"; @@ -69,7 +69,7 @@ describe("/contract/write route", () => { expect(writeTransactionStatus.minedAt).toBeDefined(); }); - test.only("Write to a contract with untyped args", async () => { + test("Write to a contract with untyped args", async () => { const res = await engine.deploy.deployNftDrop( CONFIG.CHAIN.id.toString(), backendWallet, From 5d405f037b6110b43c7176cef9d1b7ae2f3543ed Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Fri, 6 Dec 2024 17:07:17 +0800 Subject: [PATCH 25/44] refactor: clearer folder organization (#792) --- .vscode/settings.json | 17 -------- Dockerfile | 1 + package.json | 4 +- {src/scripts => scripts}/apply-migrations.ts | 10 +++-- {src/scripts => scripts}/generate-sdk.ts | 0 {src/scripts => scripts}/setup-db.ts | 8 ++-- src/index.ts | 7 ++-- src/polyfill.ts | 2 +- src/server/index.ts | 10 ++--- src/server/listeners/updateTxListener.ts | 6 +-- src/server/middleware/adminRoutes.ts | 2 +- src/server/middleware/auth.ts | 30 +++++++------- src/server/middleware/cors.ts | 2 +- src/server/middleware/engineMode.ts | 2 +- src/server/middleware/error.ts | 4 +- src/server/middleware/logs.ts | 2 +- src/server/middleware/prometheus.ts | 4 +- src/server/middleware/rateLimit.ts | 4 +- src/server/middleware/websocket.ts | 2 +- src/server/routes/admin/nonces.ts | 14 +++---- src/server/routes/admin/transaction.ts | 14 +++---- .../routes/auth/access-tokens/create.ts | 10 ++--- .../routes/auth/access-tokens/getAll.ts | 2 +- .../routes/auth/access-tokens/revoke.ts | 4 +- .../routes/auth/access-tokens/update.ts | 4 +- src/server/routes/auth/keypair/add.ts | 12 +++--- src/server/routes/auth/keypair/list.ts | 11 +++-- src/server/routes/auth/keypair/remove.ts | 8 ++-- src/server/routes/auth/permissions/getAll.ts | 2 +- src/server/routes/auth/permissions/grant.ts | 4 +- src/server/routes/auth/permissions/revoke.ts | 2 +- .../routes/backend-wallet/cancel-nonces.ts | 6 +-- src/server/routes/backend-wallet/create.ts | 4 +- src/server/routes/backend-wallet/getAll.ts | 2 +- .../routes/backend-wallet/getBalance.ts | 6 +-- src/server/routes/backend-wallet/getNonce.ts | 2 +- .../routes/backend-wallet/getTransactions.ts | 6 +-- .../backend-wallet/getTransactionsByNonce.ts | 8 ++-- src/server/routes/backend-wallet/import.ts | 2 +- src/server/routes/backend-wallet/remove.ts | 8 ++-- .../routes/backend-wallet/reset-nonces.ts | 2 +- .../routes/backend-wallet/sendTransaction.ts | 2 +- .../backend-wallet/sendTransactionBatch.ts | 2 +- .../routes/backend-wallet/signMessage.ts | 6 +-- .../routes/backend-wallet/signTransaction.ts | 6 +-- .../routes/backend-wallet/signTypedData.ts | 6 +-- .../backend-wallet/simulateTransaction.ts | 4 +- src/server/routes/backend-wallet/transfer.ts | 10 ++--- src/server/routes/backend-wallet/update.ts | 6 +-- src/server/routes/backend-wallet/withdraw.ts | 12 +++--- src/server/routes/chain/get.ts | 2 +- src/server/routes/chain/getAll.ts | 2 +- src/server/routes/configuration/auth/get.ts | 6 +-- .../routes/configuration/auth/update.ts | 8 ++-- .../backend-wallet-balance/get.ts | 6 +-- .../backend-wallet-balance/update.ts | 4 +- src/server/routes/configuration/cache/get.ts | 6 +-- .../routes/configuration/cache/update.ts | 12 +++--- src/server/routes/configuration/chains/get.ts | 2 +- .../routes/configuration/chains/update.ts | 6 +-- .../contract-subscriptions/get.ts | 6 +-- .../contract-subscriptions/update.ts | 4 +- src/server/routes/configuration/cors/add.ts | 8 ++-- src/server/routes/configuration/cors/get.ts | 6 +-- .../routes/configuration/cors/remove.ts | 8 ++-- src/server/routes/configuration/cors/set.ts | 4 +- src/server/routes/configuration/ip/get.ts | 6 +-- src/server/routes/configuration/ip/set.ts | 8 ++-- .../routes/configuration/transactions/get.ts | 2 +- .../configuration/transactions/update.ts | 4 +- .../routes/configuration/wallets/get.ts | 4 +- .../routes/configuration/wallets/update.ts | 6 +-- .../routes/contract/events/getAllEvents.ts | 6 +-- .../contract/events/getContractEventLogs.ts | 4 +- .../events/getEventLogsByTimestamp.ts | 2 +- .../routes/contract/events/getEvents.ts | 6 +-- .../contract/events/paginateEventLogs.ts | 4 +- .../extensions/account/read/getAllAdmins.ts | 6 +-- .../extensions/account/read/getAllSessions.ts | 6 +-- .../extensions/account/write/grantAdmin.ts | 4 +- .../extensions/account/write/grantSession.ts | 4 +- .../extensions/account/write/revokeAdmin.ts | 4 +- .../extensions/account/write/revokeSession.ts | 4 +- .../extensions/account/write/updateSession.ts | 4 +- .../accountFactory/read/getAllAccounts.ts | 6 +-- .../read/getAssociatedAccounts.ts | 6 +-- .../accountFactory/read/isAccountDeployed.ts | 6 +-- .../read/predictAccountAddress.ts | 2 +- .../accountFactory/write/createAccount.ts | 6 +-- .../extensions/erc1155/read/balanceOf.ts | 2 +- .../extensions/erc1155/read/canClaim.ts | 2 +- .../contract/extensions/erc1155/read/get.ts | 2 +- .../erc1155/read/getActiveClaimConditions.ts | 2 +- .../extensions/erc1155/read/getAll.ts | 2 +- .../erc1155/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc1155/read/getClaimerProofs.ts | 2 +- .../extensions/erc1155/read/getOwned.ts | 2 +- .../extensions/erc1155/read/isApproved.ts | 2 +- .../erc1155/read/signatureGenerate.ts | 10 ++--- .../extensions/erc1155/read/totalCount.ts | 2 +- .../extensions/erc1155/read/totalSupply.ts | 2 +- .../extensions/erc1155/write/airdrop.ts | 4 +- .../contract/extensions/erc1155/write/burn.ts | 4 +- .../extensions/erc1155/write/burnBatch.ts | 4 +- .../extensions/erc1155/write/claimTo.ts | 6 +-- .../extensions/erc1155/write/lazyMint.ts | 4 +- .../erc1155/write/mintAdditionalSupplyTo.ts | 4 +- .../extensions/erc1155/write/mintBatchTo.ts | 4 +- .../extensions/erc1155/write/mintTo.ts | 4 +- .../erc1155/write/setApprovalForAll.ts | 4 +- .../erc1155/write/setBatchClaimConditions.ts | 4 +- .../erc1155/write/setClaimConditions.ts | 4 +- .../extensions/erc1155/write/signatureMint.ts | 4 +- .../extensions/erc1155/write/transfer.ts | 8 ++-- .../extensions/erc1155/write/transferFrom.ts | 8 ++-- .../erc1155/write/updateClaimConditions.ts | 4 +- .../erc1155/write/updateTokenMetadata.ts | 4 +- .../extensions/erc20/read/allowanceOf.ts | 2 +- .../extensions/erc20/read/balanceOf.ts | 2 +- .../extensions/erc20/read/canClaim.ts | 6 +-- .../contract/extensions/erc20/read/get.ts | 2 +- .../erc20/read/getActiveClaimConditions.ts | 2 +- .../erc20/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../extensions/erc20/read/getClaimerProofs.ts | 2 +- .../erc20/read/signatureGenerate.ts | 10 ++--- .../extensions/erc20/read/totalSupply.ts | 2 +- .../contract/extensions/erc20/write/burn.ts | 4 +- .../extensions/erc20/write/burnFrom.ts | 4 +- .../extensions/erc20/write/claimTo.ts | 6 +-- .../extensions/erc20/write/mintBatchTo.ts | 4 +- .../contract/extensions/erc20/write/mintTo.ts | 4 +- .../extensions/erc20/write/setAllowance.ts | 4 +- .../erc20/write/setClaimConditions.ts | 4 +- .../extensions/erc20/write/signatureMint.ts | 4 +- .../extensions/erc20/write/transfer.ts | 8 ++-- .../extensions/erc20/write/transferFrom.ts | 8 ++-- .../erc20/write/updateClaimConditions.ts | 4 +- .../extensions/erc721/read/balanceOf.ts | 2 +- .../extensions/erc721/read/canClaim.ts | 2 +- .../contract/extensions/erc721/read/get.ts | 2 +- .../erc721/read/getActiveClaimConditions.ts | 2 +- .../contract/extensions/erc721/read/getAll.ts | 2 +- .../erc721/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc721/read/getClaimerProofs.ts | 2 +- .../extensions/erc721/read/getOwned.ts | 2 +- .../extensions/erc721/read/isApproved.ts | 2 +- .../erc721/read/signatureGenerate.ts | 10 ++--- .../erc721/read/signaturePrepare.ts | 6 +-- .../erc721/read/totalClaimedSupply.ts | 2 +- .../extensions/erc721/read/totalCount.ts | 2 +- .../erc721/read/totalUnclaimedSupply.ts | 2 +- .../contract/extensions/erc721/write/burn.ts | 4 +- .../extensions/erc721/write/claimTo.ts | 6 +-- .../extensions/erc721/write/lazyMint.ts | 8 ++-- .../extensions/erc721/write/mintBatchTo.ts | 8 ++-- .../extensions/erc721/write/mintTo.ts | 8 ++-- .../erc721/write/setApprovalForAll.ts | 8 ++-- .../erc721/write/setApprovalForToken.ts | 8 ++-- .../erc721/write/setClaimConditions.ts | 10 ++--- .../extensions/erc721/write/signatureMint.ts | 18 ++++---- .../extensions/erc721/write/transfer.ts | 8 ++-- .../extensions/erc721/write/transferFrom.ts | 8 ++-- .../erc721/write/updateClaimConditions.ts | 10 ++--- .../erc721/write/updateTokenMetadata.ts | 8 ++-- .../directListings/read/getAll.ts | 2 +- .../directListings/read/getAllValid.ts | 2 +- .../directListings/read/getListing.ts | 2 +- .../directListings/read/getTotalCount.ts | 2 +- .../read/isBuyerApprovedForListing.ts | 2 +- .../read/isCurrencyApprovedForListing.ts | 2 +- .../write/approveBuyerForReservedListing.ts | 4 +- .../directListings/write/buyFromListing.ts | 4 +- .../directListings/write/cancelListing.ts | 4 +- .../directListings/write/createListing.ts | 4 +- .../revokeBuyerApprovalForReservedListing.ts | 4 +- .../write/revokeCurrencyApprovalForListing.ts | 4 +- .../directListings/write/updateListing.ts | 4 +- .../englishAuctions/read/getAll.ts | 2 +- .../englishAuctions/read/getAllValid.ts | 2 +- .../englishAuctions/read/getAuction.ts | 2 +- .../englishAuctions/read/getBidBufferBps.ts | 2 +- .../englishAuctions/read/getMinimumNextBid.ts | 2 +- .../englishAuctions/read/getTotalCount.ts | 2 +- .../englishAuctions/read/getWinner.ts | 2 +- .../englishAuctions/read/getWinningBid.ts | 2 +- .../englishAuctions/read/isWinningBid.ts | 2 +- .../englishAuctions/write/buyoutAuction.ts | 4 +- .../englishAuctions/write/cancelAuction.ts | 4 +- .../write/closeAuctionForBidder.ts | 4 +- .../write/closeAuctionForSeller.ts | 4 +- .../englishAuctions/write/createAuction.ts | 4 +- .../englishAuctions/write/executeSale.ts | 4 +- .../englishAuctions/write/makeBid.ts | 4 +- .../marketplaceV3/offers/read/getAll.ts | 2 +- .../marketplaceV3/offers/read/getAllValid.ts | 2 +- .../marketplaceV3/offers/read/getOffer.ts | 2 +- .../offers/read/getTotalCount.ts | 2 +- .../marketplaceV3/offers/write/acceptOffer.ts | 4 +- .../marketplaceV3/offers/write/cancelOffer.ts | 4 +- .../marketplaceV3/offers/write/makeOffer.ts | 4 +- src/server/routes/contract/metadata/abi.ts | 2 +- src/server/routes/contract/metadata/events.ts | 2 +- .../routes/contract/metadata/extensions.ts | 6 +-- .../routes/contract/metadata/functions.ts | 6 +-- src/server/routes/contract/read/read.ts | 4 +- src/server/routes/contract/roles/read/get.ts | 2 +- .../routes/contract/roles/read/getAll.ts | 2 +- .../routes/contract/roles/write/grant.ts | 4 +- .../routes/contract/roles/write/revoke.ts | 4 +- .../royalties/read/getDefaultRoyaltyInfo.ts | 6 +-- .../royalties/read/getTokenRoyaltyInfo.ts | 2 +- .../royalties/write/setDefaultRoyaltyInfo.ts | 8 ++-- .../royalties/write/setTokenRoyaltyInfo.ts | 8 ++-- .../subscriptions/addContractSubscription.ts | 20 ++++----- .../getContractIndexedBlockRange.ts | 2 +- .../subscriptions/getContractSubscriptions.ts | 6 +-- .../contract/subscriptions/getLatestBlock.ts | 2 +- .../removeContractSubscription.ts | 8 ++-- .../transactions/getTransactionReceipts.ts | 8 ++-- .../getTransactionReceiptsByTimestamp.ts | 2 +- .../paginateTransactionReceipts.ts | 4 +- src/server/routes/contract/write/write.ts | 6 +-- src/server/routes/deploy/prebuilt.ts | 10 ++--- src/server/routes/deploy/prebuilts/edition.ts | 10 ++--- .../routes/deploy/prebuilts/editionDrop.ts | 10 ++--- .../routes/deploy/prebuilts/marketplaceV3.ts | 10 ++--- .../routes/deploy/prebuilts/multiwrap.ts | 10 ++--- .../routes/deploy/prebuilts/nftCollection.ts | 10 ++--- src/server/routes/deploy/prebuilts/nftDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/pack.ts | 10 ++--- .../routes/deploy/prebuilts/signatureDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/split.ts | 10 ++--- src/server/routes/deploy/prebuilts/token.ts | 10 ++--- .../routes/deploy/prebuilts/tokenDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/vote.ts | 10 ++--- src/server/routes/deploy/published.ts | 8 ++-- src/server/routes/relayer/create.ts | 2 +- src/server/routes/relayer/getAll.ts | 2 +- src/server/routes/relayer/index.ts | 8 ++-- src/server/routes/relayer/revoke.ts | 2 +- src/server/routes/relayer/update.ts | 2 +- src/server/routes/system/health.ts | 8 ++-- src/server/routes/system/queue.ts | 6 +-- .../routes/transaction/blockchain/getLogs.ts | 8 ++-- .../transaction/blockchain/getReceipt.ts | 4 +- .../blockchain/getUserOpReceipt.ts | 2 +- .../transaction/blockchain/sendSignedTx.ts | 4 +- .../blockchain/sendSignedUserOp.ts | 4 +- src/server/routes/transaction/cancel.ts | 18 ++++---- src/server/routes/transaction/getAll.ts | 2 +- .../transaction/getAllDeployedContracts.ts | 6 +-- src/server/routes/transaction/retry-failed.ts | 6 +-- src/server/routes/transaction/retry.ts | 10 ++--- src/server/routes/transaction/status.ts | 10 ++--- src/server/routes/transaction/sync-retry.ts | 21 ++++++---- src/server/routes/webhooks/create.ts | 8 ++-- src/server/routes/webhooks/events.ts | 6 +-- src/server/routes/webhooks/getAll.ts | 2 +- src/server/routes/webhooks/revoke.ts | 4 +- src/server/routes/webhooks/test.ts | 4 +- src/server/schemas/transaction/index.ts | 2 +- src/server/schemas/wallet/index.ts | 2 +- src/server/utils/chain.ts | 2 +- src/server/utils/storage/localStorage.ts | 8 ++-- src/server/utils/transactionOverrides.ts | 4 +- .../utils/wallets/createGcpKmsWallet.ts | 6 +-- src/server/utils/wallets/createLocalWallet.ts | 6 +-- src/server/utils/wallets/createSmartWallet.ts | 6 +-- .../utils/wallets/fetchAwsKmsWalletParams.ts | 2 +- .../utils/wallets/fetchGcpKmsWalletParams.ts | 2 +- src/server/utils/wallets/getAwsKmsAccount.ts | 2 +- src/server/utils/wallets/getGcpKmsAccount.ts | 2 +- src/server/utils/wallets/getLocalWallet.ts | 10 ++--- src/server/utils/wallets/getSmartWallet.ts | 6 +-- .../utils/wallets/importAwsKmsWallet.ts | 6 +-- .../utils/wallets/importGcpKmsWallet.ts | 6 +-- src/server/utils/wallets/importLocalWallet.ts | 2 +- src/server/utils/websocket.ts | 12 +++--- .../db/chainIndexers/getChainIndexer.ts | 2 +- .../db/chainIndexers/upsertChainIndexer.ts | 2 +- src/{ => shared}/db/client.ts | 6 +-- .../db/configuration/getConfiguration.ts | 6 +-- .../db/configuration/updateConfiguration.ts | 0 .../createContractEventLogs.ts | 4 +- .../deleteContractEventLogs.ts | 0 .../contractEventLogs/getContractEventLogs.ts | 0 .../createContractSubscription.ts | 0 .../deleteContractSubscription.ts | 0 .../getContractSubscriptions.ts | 0 .../createContractTransactionReceipts.ts | 2 +- .../deleteContractTransactionReceipts.ts | 0 .../getContractTransactionReceipts.ts | 0 src/{ => shared}/db/keypair/delete.ts | 0 src/{ => shared}/db/keypair/get.ts | 0 src/{ => shared}/db/keypair/insert.ts | 6 +-- src/{ => shared}/db/keypair/list.ts | 0 .../db/permissions/deletePermissions.ts | 0 .../db/permissions/getPermissions.ts | 2 +- .../db/permissions/updatePermissions.ts | 0 src/{ => shared}/db/relayer/getRelayerById.ts | 0 src/{ => shared}/db/tokens/createToken.ts | 0 src/{ => shared}/db/tokens/getAccessTokens.ts | 0 src/{ => shared}/db/tokens/getToken.ts | 0 src/{ => shared}/db/tokens/revokeToken.ts | 0 src/{ => shared}/db/tokens/updateToken.ts | 0 src/{ => shared}/db/transactions/db.ts | 0 src/{ => shared}/db/transactions/queueTx.ts | 4 +- .../db/wallets/createWalletDetails.ts | 2 +- .../db/wallets/deleteWalletDetails.ts | 0 src/{ => shared}/db/wallets/getAllWallets.ts | 2 +- .../db/wallets/getWalletDetails.ts | 2 +- src/{ => shared}/db/wallets/nonceMap.ts | 2 +- .../db/wallets/updateWalletDetails.ts | 0 src/{ => shared}/db/wallets/walletNonce.ts | 0 src/{ => shared}/db/webhooks/createWebhook.ts | 2 +- .../db/webhooks/getAllWebhooks.ts | 0 src/{ => shared}/db/webhooks/getWebhook.ts | 0 src/{ => shared}/db/webhooks/revokeWebhook.ts | 0 src/{ => shared}/lib/cache/swr.ts | 0 .../lib/chain/chain-capabilities.ts | 0 .../transaction/get-transaction-receipt.ts | 0 .../auth/index.ts => shared/schemas/auth.ts} | 0 src/{schema => shared/schemas}/config.ts | 0 src/{schema => shared/schemas}/extension.ts | 0 .../keypairs.ts => shared/schemas/keypair.ts} | 4 +- src/{schema => shared/schemas}/prisma.ts | 0 src/{constants => shared/schemas}/relayer.ts | 0 src/{schema => shared/schemas}/wallet.ts | 0 src/{schema => shared/schemas}/webhooks.ts | 0 src/{ => shared}/utils/account.ts | 12 +++--- src/{ => shared}/utils/auth.ts | 0 src/{ => shared}/utils/block.ts | 0 src/{ => shared}/utils/cache/accessToken.ts | 0 src/{ => shared}/utils/cache/authWallet.ts | 0 src/{ => shared}/utils/cache/clearCache.ts | 0 src/{ => shared}/utils/cache/getConfig.ts | 2 +- src/{ => shared}/utils/cache/getContract.ts | 6 +-- src/{ => shared}/utils/cache/getContractv5.ts | 0 src/{ => shared}/utils/cache/getSdk.ts | 2 +- .../utils/cache/getSmartWalletV5.ts | 0 src/{ => shared}/utils/cache/getWallet.ts | 14 +++---- src/{ => shared}/utils/cache/getWebhook.ts | 2 +- src/{ => shared}/utils/cache/keypair.ts | 0 src/{ => shared}/utils/chain.ts | 0 src/{ => shared}/utils/cron/clearCacheCron.ts | 0 src/{ => shared}/utils/cron/isValidCron.ts | 2 +- src/{ => shared}/utils/crypto.ts | 0 src/{ => shared}/utils/date.ts | 0 src/{ => shared}/utils/env.ts | 0 src/{ => shared}/utils/error.ts | 0 src/{ => shared}/utils/ethers.ts | 0 .../utils/indexer/getBlockTime.ts | 0 src/{ => shared}/utils/logger.ts | 0 src/{ => shared}/utils/math.ts | 0 src/{ => shared}/utils/primitiveTypes.ts | 0 src/{ => shared}/utils/prometheus.ts | 2 +- src/{ => shared}/utils/redis/lock.ts | 0 src/{ => shared}/utils/redis/redis.ts | 0 src/{ => shared}/utils/sdk.ts | 0 .../utils/transaction/cancelTransaction.ts | 0 .../utils/transaction/insertTransaction.ts | 8 ++-- .../utils/transaction/queueTransation.ts | 6 +-- .../transaction/simulateQueuedTransaction.ts | 0 src/{ => shared}/utils/transaction/types.ts | 0 src/{ => shared}/utils/transaction/webhook.ts | 4 +- src/{ => shared}/utils/usage.ts | 18 ++++---- src/{ => shared}/utils/webhook.ts | 0 src/{utils => }/tracer.ts | 2 +- src/worker/indexers/chainIndexerRegistry.ts | 4 +- src/worker/listeners/chainIndexerListener.ts | 4 +- src/worker/listeners/configListener.ts | 8 ++-- src/worker/listeners/webhookListener.ts | 6 +-- .../queues/cancelRecycledNoncesQueue.ts | 2 +- .../migratePostgresTransactionsQueue.ts | 2 +- src/worker/queues/mineTransactionQueue.ts | 2 +- src/worker/queues/nonceHealthCheckQueue.ts | 2 +- src/worker/queues/nonceResyncQueue.ts | 2 +- src/worker/queues/processEventLogsQueue.ts | 6 +-- .../queues/processTransactionReceiptsQueue.ts | 6 +-- src/worker/queues/pruneTransactionsQueue.ts | 2 +- src/worker/queues/queues.ts | 4 +- src/worker/queues/sendTransactionQueue.ts | 2 +- src/worker/queues/sendWebhookQueue.ts | 8 ++-- .../tasks/cancelRecycledNoncesWorker.ts | 14 +++---- src/worker/tasks/chainIndexer.ts | 14 +++---- src/worker/tasks/manageChainIndexers.ts | 2 +- .../migratePostgresTransactionsWorker.ts | 19 +++++---- src/worker/tasks/mineTransactionWorker.ts | 39 ++++++++++-------- src/worker/tasks/nonceHealthCheckWorker.ts | 6 +-- src/worker/tasks/nonceResyncWorker.ts | 14 +++---- src/worker/tasks/processEventLogsWorker.ts | 18 ++++---- .../tasks/processTransactionReceiptsWorker.ts | 18 ++++---- src/worker/tasks/pruneTransactionsWorker.ts | 8 ++-- src/worker/tasks/sendTransactionWorker.ts | 30 +++++++------- src/worker/tasks/sendWebhookWorker.ts | 13 +++--- src/worker/utils/contractId.ts | 2 - src/worker/utils/nonce.ts | 25 ----------- {test => tests}/e2e/.env.test.example | 0 {test => tests}/e2e/.gitignore | 0 {test => tests}/e2e/README.md | 0 {test => tests}/e2e/bun.lockb | Bin {test => tests}/e2e/config.ts | 0 {test => tests}/e2e/package.json | 0 {test => tests}/e2e/scripts/counter.ts | 4 +- {test => tests}/e2e/tests/extensions.test.ts | 2 +- {test => tests}/e2e/tests/load.test.ts | 2 +- {test => tests}/e2e/tests/read.test.ts | 2 +- .../e2e/tests/routes/erc1155-transfer.test.ts | 0 .../e2e/tests/routes/erc20-transfer.test.ts | 2 +- .../e2e/tests/routes/erc721-transfer.test.ts | 0 .../e2e/tests/routes/signMessage.test.ts | 0 .../e2e/tests/routes/signaturePrepare.test.ts | 0 .../e2e/tests/routes/write.test.ts | 8 ++-- {test => tests}/e2e/tests/setup.ts | 2 +- .../e2e/tests/sign-transaction.test.ts | 0 .../smart-aws-wallet.test.ts | 0 .../smart-gcp-wallet.test.ts | 0 .../smart-local-wallet-sdk-v4.test.ts | 0 .../smart-local-wallet.test.ts | 0 {test => tests}/e2e/tests/smoke.test.ts | 0 {test => tests}/e2e/tests/userop.test.ts | 2 +- .../e2e/tests/utils/getBlockTime.test.ts | 0 {test => tests}/e2e/tsconfig.json | 0 {test => tests}/e2e/utils/anvil.ts | 0 {test => tests}/e2e/utils/engine.ts | 2 +- {test => tests}/e2e/utils/statistics.ts | 0 {test => tests}/e2e/utils/transactions.ts | 4 +- {test => tests}/e2e/utils/wallets.ts | 0 {src/tests/config => tests/shared}/aws-kms.ts | 0 {src/tests => tests}/shared/chain.ts | 0 {src/tests => tests}/shared/client.ts | 0 {src/tests/config => tests/shared}/gcp-kms.ts | 0 {src/tests => tests}/shared/typed-data.ts | 0 {src/tests => tests/unit}/auth.test.ts | 27 ++++++------ {src/tests => tests/unit}/aws-arn.test.ts | 2 +- .../wallets => tests/unit}/aws-kms.test.ts | 7 +--- {src/tests => tests/unit}/chain.test.ts | 4 +- .../wallets => tests/unit}/gcp-kms.test.ts | 8 ++-- .../unit}/gcp-resource-path.test.ts | 2 +- {src/tests => tests/unit}/math.test.ts | 2 +- {src/tests => tests/unit}/schema.test.ts | 4 +- {src/tests => tests/unit}/swr.test.ts | 2 +- {src/tests => tests/unit}/validator.test.ts | 2 +- tsconfig.json | 2 +- vitest.config.ts | 3 +- vitest.global-setup.ts | 28 +++++++------ 449 files changed, 978 insertions(+), 1000 deletions(-) delete mode 100644 .vscode/settings.json rename {src/scripts => scripts}/apply-migrations.ts (88%) rename {src/scripts => scripts}/generate-sdk.ts (100%) rename {src/scripts => scripts}/setup-db.ts (79%) rename src/{ => shared}/db/chainIndexers/getChainIndexer.ts (94%) rename src/{ => shared}/db/chainIndexers/upsertChainIndexer.ts (91%) rename src/{ => shared}/db/client.ts (84%) rename src/{ => shared}/db/configuration/getConfiguration.ts (98%) rename src/{ => shared}/db/configuration/updateConfiguration.ts (100%) rename src/{ => shared}/db/contractEventLogs/createContractEventLogs.ts (78%) rename src/{ => shared}/db/contractEventLogs/deleteContractEventLogs.ts (100%) rename src/{ => shared}/db/contractEventLogs/getContractEventLogs.ts (100%) rename src/{ => shared}/db/contractSubscriptions/createContractSubscription.ts (100%) rename src/{ => shared}/db/contractSubscriptions/deleteContractSubscription.ts (100%) rename src/{ => shared}/db/contractSubscriptions/getContractSubscriptions.ts (100%) rename src/{ => shared}/db/contractTransactionReceipts/createContractTransactionReceipts.ts (91%) rename src/{ => shared}/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts (100%) rename src/{ => shared}/db/contractTransactionReceipts/getContractTransactionReceipts.ts (100%) rename src/{ => shared}/db/keypair/delete.ts (100%) rename src/{ => shared}/db/keypair/get.ts (100%) rename src/{ => shared}/db/keypair/insert.ts (72%) rename src/{ => shared}/db/keypair/list.ts (100%) rename src/{ => shared}/db/permissions/deletePermissions.ts (100%) rename src/{ => shared}/db/permissions/getPermissions.ts (92%) rename src/{ => shared}/db/permissions/updatePermissions.ts (100%) rename src/{ => shared}/db/relayer/getRelayerById.ts (100%) rename src/{ => shared}/db/tokens/createToken.ts (100%) rename src/{ => shared}/db/tokens/getAccessTokens.ts (100%) rename src/{ => shared}/db/tokens/getToken.ts (100%) rename src/{ => shared}/db/tokens/revokeToken.ts (100%) rename src/{ => shared}/db/tokens/updateToken.ts (100%) rename src/{ => shared}/db/transactions/db.ts (100%) rename src/{ => shared}/db/transactions/queueTx.ts (95%) rename src/{ => shared}/db/wallets/createWalletDetails.ts (98%) rename src/{ => shared}/db/wallets/deleteWalletDetails.ts (100%) rename src/{ => shared}/db/wallets/getAllWallets.ts (86%) rename src/{ => shared}/db/wallets/getWalletDetails.ts (99%) rename src/{ => shared}/db/wallets/nonceMap.ts (98%) rename src/{ => shared}/db/wallets/updateWalletDetails.ts (100%) rename src/{ => shared}/db/wallets/walletNonce.ts (100%) rename src/{ => shared}/db/webhooks/createWebhook.ts (91%) rename src/{ => shared}/db/webhooks/getAllWebhooks.ts (100%) rename src/{ => shared}/db/webhooks/getWebhook.ts (100%) rename src/{ => shared}/db/webhooks/revokeWebhook.ts (100%) rename src/{ => shared}/lib/cache/swr.ts (100%) rename src/{ => shared}/lib/chain/chain-capabilities.ts (100%) rename src/{ => shared}/lib/transaction/get-transaction-receipt.ts (100%) rename src/{server/schemas/auth/index.ts => shared/schemas/auth.ts} (100%) rename src/{schema => shared/schemas}/config.ts (100%) rename src/{schema => shared/schemas}/extension.ts (100%) rename src/{server/schemas/keypairs.ts => shared/schemas/keypair.ts} (93%) rename src/{schema => shared/schemas}/prisma.ts (100%) rename src/{constants => shared/schemas}/relayer.ts (100%) rename src/{schema => shared/schemas}/wallet.ts (100%) rename src/{schema => shared/schemas}/webhooks.ts (100%) rename src/{ => shared}/utils/account.ts (93%) rename src/{ => shared}/utils/auth.ts (100%) rename src/{ => shared}/utils/block.ts (100%) rename src/{ => shared}/utils/cache/accessToken.ts (100%) rename src/{ => shared}/utils/cache/authWallet.ts (100%) rename src/{ => shared}/utils/cache/clearCache.ts (100%) rename src/{ => shared}/utils/cache/getConfig.ts (86%) rename src/{ => shared}/utils/cache/getContract.ts (82%) rename src/{ => shared}/utils/cache/getContractv5.ts (100%) rename src/{ => shared}/utils/cache/getSdk.ts (97%) rename src/{ => shared}/utils/cache/getSmartWalletV5.ts (100%) rename src/{ => shared}/utils/cache/getWallet.ts (91%) rename src/{ => shared}/utils/cache/getWebhook.ts (91%) rename src/{ => shared}/utils/cache/keypair.ts (100%) rename src/{ => shared}/utils/chain.ts (100%) rename src/{ => shared}/utils/cron/clearCacheCron.ts (100%) rename src/{ => shared}/utils/cron/isValidCron.ts (96%) rename src/{ => shared}/utils/crypto.ts (100%) rename src/{ => shared}/utils/date.ts (100%) rename src/{ => shared}/utils/env.ts (100%) rename src/{ => shared}/utils/error.ts (100%) rename src/{ => shared}/utils/ethers.ts (100%) rename src/{ => shared}/utils/indexer/getBlockTime.ts (100%) rename src/{ => shared}/utils/logger.ts (100%) rename src/{ => shared}/utils/math.ts (100%) rename src/{ => shared}/utils/primitiveTypes.ts (100%) rename src/{ => shared}/utils/prometheus.ts (98%) rename src/{ => shared}/utils/redis/lock.ts (100%) rename src/{ => shared}/utils/redis/redis.ts (100%) rename src/{ => shared}/utils/sdk.ts (100%) rename src/{ => shared}/utils/transaction/cancelTransaction.ts (100%) rename src/{ => shared}/utils/transaction/insertTransaction.ts (95%) rename src/{ => shared}/utils/transaction/queueTransation.ts (90%) rename src/{ => shared}/utils/transaction/simulateQueuedTransaction.ts (100%) rename src/{ => shared}/utils/transaction/types.ts (100%) rename src/{ => shared}/utils/transaction/webhook.ts (80%) rename src/{ => shared}/utils/usage.ts (86%) rename src/{ => shared}/utils/webhook.ts (100%) rename src/{utils => }/tracer.ts (79%) delete mode 100644 src/worker/utils/contractId.ts delete mode 100644 src/worker/utils/nonce.ts rename {test => tests}/e2e/.env.test.example (100%) rename {test => tests}/e2e/.gitignore (100%) rename {test => tests}/e2e/README.md (100%) rename {test => tests}/e2e/bun.lockb (100%) rename {test => tests}/e2e/config.ts (100%) rename {test => tests}/e2e/package.json (100%) rename {test => tests}/e2e/scripts/counter.ts (90%) rename {test => tests}/e2e/tests/extensions.test.ts (98%) rename {test => tests}/e2e/tests/load.test.ts (98%) rename {test => tests}/e2e/tests/read.test.ts (99%) rename {test => tests}/e2e/tests/routes/erc1155-transfer.test.ts (100%) rename {test => tests}/e2e/tests/routes/erc20-transfer.test.ts (99%) rename {test => tests}/e2e/tests/routes/erc721-transfer.test.ts (100%) rename {test => tests}/e2e/tests/routes/signMessage.test.ts (100%) rename {test => tests}/e2e/tests/routes/signaturePrepare.test.ts (100%) rename {test => tests}/e2e/tests/routes/write.test.ts (97%) rename {test => tests}/e2e/tests/setup.ts (96%) rename {test => tests}/e2e/tests/sign-transaction.test.ts (100%) rename {test => tests}/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts (100%) rename {test => tests}/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts (100%) rename {test => tests}/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts (100%) rename {test => tests}/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts (100%) rename {test => tests}/e2e/tests/smoke.test.ts (100%) rename {test => tests}/e2e/tests/userop.test.ts (98%) rename {test => tests}/e2e/tests/utils/getBlockTime.test.ts (100%) rename {test => tests}/e2e/tsconfig.json (100%) rename {test => tests}/e2e/utils/anvil.ts (100%) rename {test => tests}/e2e/utils/engine.ts (95%) rename {test => tests}/e2e/utils/statistics.ts (100%) rename {test => tests}/e2e/utils/transactions.ts (95%) rename {test => tests}/e2e/utils/wallets.ts (100%) rename {src/tests/config => tests/shared}/aws-kms.ts (100%) rename {src/tests => tests}/shared/chain.ts (100%) rename {src/tests => tests}/shared/client.ts (100%) rename {src/tests/config => tests/shared}/gcp-kms.ts (100%) rename {src/tests => tests}/shared/typed-data.ts (100%) rename {src/tests => tests/unit}/auth.test.ts (96%) rename {src/tests => tests/unit}/aws-arn.test.ts (97%) rename {src/tests/wallets => tests/unit}/aws-kms.test.ts (95%) rename {src/tests => tests/unit}/chain.test.ts (96%) rename {src/tests/wallets => tests/unit}/gcp-kms.test.ts (94%) rename {src/tests => tests/unit}/gcp-resource-path.test.ts (97%) rename {src/tests => tests/unit}/math.test.ts (93%) rename {src/tests => tests/unit}/schema.test.ts (97%) rename {src/tests => tests/unit}/swr.test.ts (98%) rename {src/tests => tests/unit}/validator.test.ts (94%) diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 3bbcfc60d..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "editor.codeActionsOnSave": { - "source.organizeImports": "explicit", - "source.eslint.fixAll": "explicit" - }, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, - "eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }], - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true, - "[prisma]": { - "editor.defaultFormatter": "Prisma.prisma" - }, - "[typescript]": { - "editor.defaultFormatter": "biomejs.biome" - } -} diff --git a/Dockerfile b/Dockerfile index 4cf99266f..9728e659f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,7 @@ COPY --from=build /app/package.json . COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/src/prisma/* ./src/prisma/ COPY --from=build /app/dist ./dist +COPY --from=build /app/scripts ./dist/scripts # Replace the schema path in the package.json file RUN sed -i 's_"schema": "./src/prisma/schema.prisma"_"schema": "./dist/prisma/schema.prisma"_g' package.json diff --git a/package.json b/package.json index 371ab1621..f8497a342 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "dev:run": "npx nodemon --watch 'src/**/*.ts' --exec 'npx tsx ./src/index.ts' --files src/index.ts", "build": "rm -rf dist && tsc -p ./tsconfig.json --outDir dist", "build:docker": "docker build . -f Dockerfile -t prod", - "generate:sdk": "npx tsx ./src/scripts/generate-sdk && cd ./sdk && yarn build", - "prisma:setup:dev": "npx tsx ./src/scripts/setup-db.ts", + "generate:sdk": "npx tsx ./scripts/generate-sdk && cd ./sdk && yarn build", + "prisma:setup:dev": "npx tsx ./scripts/setup-db.ts", "prisma:setup:prod": "npx tsx ./dist/scripts/setup-db.js", "start": "yarn prisma:setup:prod && yarn start:migrations && yarn start:run", "start:migrations": "npx tsx ./dist/scripts/apply-migrations.js", diff --git a/src/scripts/apply-migrations.ts b/scripts/apply-migrations.ts similarity index 88% rename from src/scripts/apply-migrations.ts rename to scripts/apply-migrations.ts index cda3af90c..12b16ff3b 100644 --- a/src/scripts/apply-migrations.ts +++ b/scripts/apply-migrations.ts @@ -1,6 +1,10 @@ -import { logger } from "../utils/logger"; -import { acquireLock, releaseLock, waitForLock } from "../utils/redis/lock"; -import { redis } from "../utils/redis/redis"; +import { logger } from "../src/shared/utils/logger"; +import { + acquireLock, + releaseLock, + waitForLock, +} from "../src/shared/utils/redis/lock"; +import { redis } from "../src/shared/utils/redis/redis"; const MIGRATION_LOCK_TTL_SECONDS = 60; diff --git a/src/scripts/generate-sdk.ts b/scripts/generate-sdk.ts similarity index 100% rename from src/scripts/generate-sdk.ts rename to scripts/generate-sdk.ts diff --git a/src/scripts/setup-db.ts b/scripts/setup-db.ts similarity index 79% rename from src/scripts/setup-db.ts rename to scripts/setup-db.ts index 80d992fd9..fa6dad550 100644 --- a/src/scripts/setup-db.ts +++ b/scripts/setup-db.ts @@ -1,5 +1,5 @@ -import { execSync } from "child_process"; -import { prisma } from "../db/client"; +import { execSync } from "node:child_process"; +import { prisma } from "../src/shared/db/client"; const main = async () => { const [{ exists: hasWalletsTable }]: [{ exists: boolean }] = @@ -14,8 +14,8 @@ const main = async () => { const schema = process.env.NODE_ENV === "production" - ? `./dist/prisma/schema.prisma` - : `./src/prisma/schema.prisma`; + ? "./dist/prisma/schema.prisma" + : "./src/prisma/schema.prisma"; if (hasWalletsTable) { execSync(`yarn prisma migrate reset --force --schema ${schema}`, { diff --git a/src/index.ts b/src/index.ts index 764540ee4..ba0d72ebb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,9 @@ import "./polyfill"; +import "./tracer"; + import { initServer } from "./server"; -import { env } from "./utils/env"; -import { logger } from "./utils/logger"; -import "./utils/tracer"; +import { env } from "./shared/utils/env"; +import { logger } from "./shared/utils/logger"; import { initWorker } from "./worker"; import { CancelRecycledNoncesQueue } from "./worker/queues/cancelRecycledNoncesQueue"; import { MigratePostgresTransactionsQueue } from "./worker/queues/migratePostgresTransactionsQueue"; diff --git a/src/polyfill.ts b/src/polyfill.ts index 103de544e..029207c32 100644 --- a/src/polyfill.ts +++ b/src/polyfill.ts @@ -1,4 +1,4 @@ -import * as crypto from "crypto"; +import * as crypto from "node:crypto"; if (typeof globalThis.crypto === "undefined") { (globalThis as any).crypto = crypto; diff --git a/src/server/index.ts b/src/server/index.ts index 4b6deb374..a0a576dfc 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -3,11 +3,11 @@ import fastify, { type FastifyInstance } from "fastify"; import * as fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; -import { clearCacheCron } from "../utils/cron/clearCacheCron"; -import { env } from "../utils/env"; -import { logger } from "../utils/logger"; -import { metricsServer } from "../utils/prometheus"; -import { withServerUsageReporting } from "../utils/usage"; +import { clearCacheCron } from "../shared/utils/cron/clearCacheCron"; +import { env } from "../shared/utils/env"; +import { logger } from "../shared/utils/logger"; +import { metricsServer } from "../shared/utils/prometheus"; +import { withServerUsageReporting } from "../shared/utils/usage"; import { updateTxListener } from "./listeners/updateTxListener"; import { withAdminRoutes } from "./middleware/adminRoutes"; import { withAuth } from "./middleware/auth"; diff --git a/src/server/listeners/updateTxListener.ts b/src/server/listeners/updateTxListener.ts index d8ff01ebf..150a41650 100644 --- a/src/server/listeners/updateTxListener.ts +++ b/src/server/listeners/updateTxListener.ts @@ -1,6 +1,6 @@ -import { knex } from "../../db/client"; -import { TransactionDB } from "../../db/transactions/db"; -import { logger } from "../../utils/logger"; +import { knex } from "../../shared/db/client"; +import { TransactionDB } from "../../shared/db/transactions/db"; +import { logger } from "../../shared/utils/logger"; import { toTransactionSchema } from "../schemas/transaction"; import { subscriptionsData } from "../schemas/websocket"; import { diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/adminRoutes.ts index 1dac982df..297330a13 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/adminRoutes.ts @@ -5,7 +5,7 @@ import type { Queue } from "bullmq"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { timingSafeEqual } from "node:crypto"; -import { env } from "../../utils/env"; +import { env } from "../../shared/utils/env"; import { CancelRecycledNoncesQueue } from "../../worker/queues/cancelRecycledNoncesQueue"; import { MigratePostgresTransactionsQueue } from "../../worker/queues/migratePostgresTransactionsQueue"; import { MineTransactionQueue } from "../../worker/queues/mineTransactionQueue"; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 19883aa98..022519a41 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -5,25 +5,25 @@ import { type ThirdwebAuthUser, } from "@thirdweb-dev/auth/fastify"; import { AsyncWallet } from "@thirdweb-dev/wallets/evm/wallets/async"; -import { createHash } from "crypto"; +import { createHash } from "node:crypto"; 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 "../../db/permissions/getPermissions"; -import { createToken } from "../../db/tokens/createToken"; -import { revokeToken } from "../../db/tokens/revokeToken"; -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../../utils/auth"; -import { getAccessToken } from "../../utils/cache/accessToken"; -import { getAuthWallet } from "../../utils/cache/authWallet"; -import { getConfig } from "../../utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; -import { getKeypair } from "../../utils/cache/keypair"; -import { env } from "../../utils/env"; -import { logger } from "../../utils/logger"; -import { sendWebhookRequest } from "../../utils/webhook"; -import { Permission } from "../schemas/auth"; +import { getPermissions } from "../../shared/db/permissions/getPermissions"; +import { createToken } from "../../shared/db/tokens/createToken"; +import { revokeToken } from "../../shared/db/tokens/revokeToken"; +import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; +import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../../shared/utils/auth"; +import { getAccessToken } from "../../shared/utils/cache/accessToken"; +import { getAuthWallet } from "../../shared/utils/cache/authWallet"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { getKeypair } from "../../shared/utils/cache/keypair"; +import { env } from "../../shared/utils/env"; +import { logger } from "../../shared/utils/logger"; +import { sendWebhookRequest } from "../../shared/utils/webhook"; +import { Permission } from "../../shared/schemas/auth"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/cors.ts b/src/server/middleware/cors.ts index ce9997a52..da81b02fa 100644 --- a/src/server/middleware/cors.ts +++ b/src/server/middleware/cors.ts @@ -1,5 +1,5 @@ import type { FastifyInstance } from "fastify"; -import { getConfig } from "../../utils/cache/getConfig"; +import { getConfig } from "../../shared/utils/cache/getConfig"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; const STANDARD_METHODS = "GET,POST,DELETE,PUT,PATCH,HEAD,PUT,PATCH,POST,DELETE"; diff --git a/src/server/middleware/engineMode.ts b/src/server/middleware/engineMode.ts index c111c5fdd..9abd2c220 100644 --- a/src/server/middleware/engineMode.ts +++ b/src/server/middleware/engineMode.ts @@ -1,5 +1,5 @@ import type { FastifyInstance } from "fastify"; -import { env } from "../../utils/env"; +import { env } from "../../shared/utils/env"; export function withEnforceEngineMode(server: FastifyInstance) { if (env.ENGINE_MODE === "sandbox") { diff --git a/src/server/middleware/error.ts b/src/server/middleware/error.ts index 5b321cbfd..f993750f9 100644 --- a/src/server/middleware/error.ts +++ b/src/server/middleware/error.ts @@ -1,8 +1,8 @@ import type { FastifyInstance } from "fastify"; import { ReasonPhrases, StatusCodes } from "http-status-codes"; import { ZodError } from "zod"; -import { env } from "../../utils/env"; -import { parseEthersError } from "../../utils/ethers"; +import { env } from "../../shared/utils/env"; +import { parseEthersError } from "../../shared/utils/ethers"; export type CustomError = { message: string; diff --git a/src/server/middleware/logs.ts b/src/server/middleware/logs.ts index e5ed3a6b5..3ba0cfaf7 100644 --- a/src/server/middleware/logs.ts +++ b/src/server/middleware/logs.ts @@ -1,6 +1,6 @@ import type { FastifyInstance } from "fastify"; import { stringify } from "thirdweb/utils"; -import { logger } from "../../utils/logger"; +import { logger } from "../../shared/utils/logger"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/prometheus.ts b/src/server/middleware/prometheus.ts index 64bae9d49..29a54b252 100644 --- a/src/server/middleware/prometheus.ts +++ b/src/server/middleware/prometheus.ts @@ -1,6 +1,6 @@ import type { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; -import { env } from "../../utils/env"; -import { recordMetrics } from "../../utils/prometheus"; +import { env } from "../../shared/utils/env"; +import { recordMetrics } from "../../shared/utils/prometheus"; export function withPrometheus(server: FastifyInstance) { if (!env.METRICS_ENABLED) { diff --git a/src/server/middleware/rateLimit.ts b/src/server/middleware/rateLimit.ts index 97c3f72cd..96911855a 100644 --- a/src/server/middleware/rateLimit.ts +++ b/src/server/middleware/rateLimit.ts @@ -1,7 +1,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../utils/env"; -import { redis } from "../../utils/redis/redis"; +import { env } from "../../shared/utils/env"; +import { redis } from "../../shared/utils/redis/redis"; import { createCustomError } from "./error"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/websocket.ts b/src/server/middleware/websocket.ts index 6c7ebceef..b84363dd3 100644 --- a/src/server/middleware/websocket.ts +++ b/src/server/middleware/websocket.ts @@ -1,6 +1,6 @@ import WebSocketPlugin from "@fastify/websocket"; import type { FastifyInstance } from "fastify"; -import { logger } from "../../utils/logger"; +import { logger } from "../../shared/utils/logger"; export async function withWebSocket(server: FastifyInstance) { await server.register(WebSocketPlugin, { diff --git a/src/server/routes/admin/nonces.ts b/src/server/routes/admin/nonces.ts index 2a2f528d3..75e109405 100644 --- a/src/server/routes/admin/nonces.ts +++ b/src/server/routes/admin/nonces.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { - Address, + type Address, eth_getTransactionCount, getAddress, getRpcClient, @@ -12,10 +12,10 @@ import { lastUsedNonceKey, recycledNoncesKey, sentNoncesKey, -} from "../../../db/wallets/walletNonce"; -import { getChain } from "../../../utils/chain"; -import { redis } from "../../../utils/redis/redis"; -import { thirdwebClient } from "../../../utils/sdk"; +} from "../../../shared/db/wallets/walletNonce"; +import { getChain } from "../../../shared/utils/chain"; +import { redis } from "../../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/admin/transaction.ts b/src/server/routes/admin/transaction.ts index 5827e5d24..d8eace0b7 100644 --- a/src/server/routes/admin/transaction.ts +++ b/src/server/routes/admin/transaction.ts @@ -1,12 +1,12 @@ -import { Static, Type } from "@sinclair/typebox"; -import { Queue } from "bullmq"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { Queue } from "bullmq"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { stringify } from "thirdweb/utils"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getConfig } from "../../../utils/cache/getConfig"; -import { maybeDate } from "../../../utils/primitiveTypes"; -import { redis } from "../../../utils/redis/redis"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { maybeDate } from "../../../shared/utils/primitiveTypes"; +import { redis } from "../../../shared/utils/redis/redis"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/auth/access-tokens/create.ts b/src/server/routes/auth/access-tokens/create.ts index 9c33113cd..b69b6cf20 100644 --- a/src/server/routes/auth/access-tokens/create.ts +++ b/src/server/routes/auth/access-tokens/create.ts @@ -3,11 +3,11 @@ 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 "../../../../db/configuration/updateConfiguration"; -import { createToken } from "../../../../db/tokens/createToken"; -import { accessTokenCache } from "../../../../utils/cache/accessToken"; -import { getConfig } from "../../../../utils/cache/getConfig"; -import { env } from "../../../../utils/env"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { createToken } from "../../../../shared/db/tokens/createToken"; +import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { env } from "../../../../shared/utils/env"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { AccessTokenSchema } from "./getAll"; diff --git a/src/server/routes/auth/access-tokens/getAll.ts b/src/server/routes/auth/access-tokens/getAll.ts index 181f35ec8..9cbe3646b 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 "../../../../db/tokens/getAccessTokens"; +import { getAccessTokens } from "../../../../shared/db/tokens/getAccessTokens"; 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 2d509bb65..39aad0a00 100644 --- a/src/server/routes/auth/access-tokens/revoke.ts +++ b/src/server/routes/auth/access-tokens/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 { revokeToken } from "../../../../db/tokens/revokeToken"; -import { accessTokenCache } from "../../../../utils/cache/accessToken"; +import { revokeToken } from "../../../../shared/db/tokens/revokeToken"; +import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/access-tokens/update.ts b/src/server/routes/auth/access-tokens/update.ts index a5d730fdb..f09b5ce5f 100644 --- a/src/server/routes/auth/access-tokens/update.ts +++ b/src/server/routes/auth/access-tokens/update.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateToken } from "../../../../db/tokens/updateToken"; -import { accessTokenCache } from "../../../../utils/cache/accessToken"; +import { updateToken } from "../../../../shared/db/tokens/updateToken"; +import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/add.ts b/src/server/routes/auth/keypair/add.ts index 3ecc24364..2aab345ba 100644 --- a/src/server/routes/auth/keypair/add.ts +++ b/src/server/routes/auth/keypair/add.ts @@ -1,15 +1,15 @@ -import { Keypairs, Prisma } from "@prisma/client"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Keypairs, Prisma } from "@prisma/client"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { insertKeypair } from "../../../../db/keypair/insert"; -import { isWellFormedPublicKey } from "../../../../utils/crypto"; +import { insertKeypair } from "../../../../shared/db/keypair/insert"; +import { isWellFormedPublicKey } from "../../../../shared/utils/crypto"; import { createCustomError } from "../../../middleware/error"; import { KeypairAlgorithmSchema, KeypairSchema, toKeypairSchema, -} from "../../../schemas/keypairs"; +} from "../../../../shared/schemas/keypair"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/list.ts b/src/server/routes/auth/keypair/list.ts index 8c4395f0e..81fab4e68 100644 --- a/src/server/routes/auth/keypair/list.ts +++ b/src/server/routes/auth/keypair/list.ts @@ -1,8 +1,11 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { listKeypairs } from "../../../../db/keypair/list"; -import { KeypairSchema, toKeypairSchema } from "../../../schemas/keypairs"; +import { listKeypairs } from "../../../../shared/db/keypair/list"; +import { + KeypairSchema, + toKeypairSchema, +} from "../../../../shared/schemas/keypair"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/remove.ts b/src/server/routes/auth/keypair/remove.ts index 939979d52..6cc65f2ff 100644 --- a/src/server/routes/auth/keypair/remove.ts +++ b/src/server/routes/auth/keypair/remove.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { deleteKeypair } from "../../../../db/keypair/delete"; -import { keypairCache } from "../../../../utils/cache/keypair"; +import { deleteKeypair } from "../../../../shared/db/keypair/delete"; +import { keypairCache } from "../../../../shared/utils/cache/keypair"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/permissions/getAll.ts b/src/server/routes/auth/permissions/getAll.ts index 7a4f5d4a4..22e4b1478 100644 --- a/src/server/routes/auth/permissions/getAll.ts +++ b/src/server/routes/auth/permissions/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 { prisma } from "../../../../db/client"; +import { prisma } from "../../../../shared/db/client"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/auth/permissions/grant.ts b/src/server/routes/auth/permissions/grant.ts index 6f9ef49ee..fcde00839 100644 --- a/src/server/routes/auth/permissions/grant.ts +++ b/src/server/routes/auth/permissions/grant.ts @@ -1,9 +1,9 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updatePermissions } from "../../../../db/permissions/updatePermissions"; +import { updatePermissions } from "../../../../shared/db/permissions/updatePermissions"; import { AddressSchema } from "../../../schemas/address"; -import { permissionsSchema } from "../../../schemas/auth"; +import { permissionsSchema } from "../../../../shared/schemas/auth"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/permissions/revoke.ts b/src/server/routes/auth/permissions/revoke.ts index 08f1609bb..6e72d7364 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 "../../../../db/permissions/deletePermissions"; +import { deletePermissions } from "../../../../shared/db/permissions/deletePermissions"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/cancel-nonces.ts b/src/server/routes/backend-wallet/cancel-nonces.ts index cb4f6cf73..47803817c 100644 --- a/src/server/routes/backend-wallet/cancel-nonces.ts +++ b/src/server/routes/backend-wallet/cancel-nonces.ts @@ -3,9 +3,9 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_getTransactionCount, getRpcClient } from "thirdweb"; import { checksumAddress } from "thirdweb/utils"; -import { getChain } from "../../../utils/chain"; -import { thirdwebClient } from "../../../utils/sdk"; -import { sendCancellationTransaction } from "../../../utils/transaction/cancelTransaction"; +import { getChain } from "../../../shared/utils/chain"; +import { thirdwebClient } from "../../../shared/utils/sdk"; +import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancelTransaction"; import { requestQuerystringSchema, standardResponseSchema, diff --git a/src/server/routes/backend-wallet/create.ts b/src/server/routes/backend-wallet/create.ts index c25ff560c..64162c5d0 100644 --- a/src/server/routes/backend-wallet/create.ts +++ b/src/server/routes/backend-wallet/create.ts @@ -6,8 +6,8 @@ import { DEFAULT_ACCOUNT_FACTORY_V0_7, ENTRYPOINT_ADDRESS_v0_7, } from "thirdweb/wallets/smart"; -import { WalletType } from "../../../schema/wallet"; -import { getConfig } from "../../../utils/cache/getConfig"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../middleware/error"; 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 a9a9b1a48..0a2b0e36f 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 "../../../db/wallets/getAllWallets"; +import { getAllWallets } from "../../../shared/db/wallets/getAllWallets"; import { standardResponseSchema, walletDetailsSchema, diff --git a/src/server/routes/backend-wallet/getBalance.ts b/src/server/routes/backend-wallet/getBalance.ts index 45a9987af..01f262991 100644 --- a/src/server/routes/backend-wallet/getBalance.ts +++ b/src/server/routes/backend-wallet/getBalance.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getSdk } from "../../../utils/cache/getSdk"; +import { getSdk } from "../../../shared/utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { currencyValueSchema, diff --git a/src/server/routes/backend-wallet/getNonce.ts b/src/server/routes/backend-wallet/getNonce.ts index 593cc9ed9..f5ef87ac3 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 "../../../db/wallets/walletNonce"; +import { inspectNonce } from "../../../shared/db/wallets/walletNonce"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; diff --git a/src/server/routes/backend-wallet/getTransactions.ts b/src/server/routes/backend-wallet/getTransactions.ts index 5e8dcf89e..24a215697 100644 --- a/src/server/routes/backend-wallet/getTransactions.ts +++ b/src/server/routes/backend-wallet/getTransactions.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAddress } from "thirdweb"; -import { TransactionDB } from "../../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { PaginationSchema } from "../../schemas/pagination"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/backend-wallet/getTransactionsByNonce.ts b/src/server/routes/backend-wallet/getTransactionsByNonce.ts index b804df6aa..0be1571d3 100644 --- a/src/server/routes/backend-wallet/getTransactionsByNonce.ts +++ b/src/server/routes/backend-wallet/getTransactionsByNonce.ts @@ -1,10 +1,10 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getNonceMap } from "../../../db/wallets/nonceMap"; -import { normalizeAddress } from "../../../utils/primitiveTypes"; -import type { AnyTransaction } from "../../../utils/transaction/types"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getNonceMap } from "../../../shared/db/wallets/nonceMap"; +import { normalizeAddress } from "../../../shared/utils/primitiveTypes"; +import type { AnyTransaction } from "../../../shared/utils/transaction/types"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { TransactionSchema, diff --git a/src/server/routes/backend-wallet/import.ts b/src/server/routes/backend-wallet/import.ts index 510059a14..88a93d48b 100644 --- a/src/server/routes/backend-wallet/import.ts +++ b/src/server/routes/backend-wallet/import.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/remove.ts b/src/server/routes/backend-wallet/remove.ts index 431c118d8..9f57ace6c 100644 --- a/src/server/routes/backend-wallet/remove.ts +++ b/src/server/routes/backend-wallet/remove.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { deleteWalletDetails } from "../../../db/wallets/deleteWalletDetails"; +import type { Address } from "thirdweb"; +import { deleteWalletDetails } from "../../../shared/db/wallets/deleteWalletDetails"; 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 0ec4c30e8..3237a161a 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 "../../../db/wallets/walletNonce"; +} from "../../../shared/db/wallets/walletNonce"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/sendTransaction.ts b/src/server/routes/backend-wallet/sendTransaction.ts index bb29f9386..d23add987 100644 --- a/src/server/routes/backend-wallet/sendTransaction.ts +++ b/src/server/routes/backend-wallet/sendTransaction.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, Hex } from "thirdweb"; -import { insertTransaction } from "../../../utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; import { AddressSchema } from "../../schemas/address"; import { requestQuerystringSchema, diff --git a/src/server/routes/backend-wallet/sendTransactionBatch.ts b/src/server/routes/backend-wallet/sendTransactionBatch.ts index 3d69c4431..d887e9bed 100644 --- a/src/server/routes/backend-wallet/sendTransactionBatch.ts +++ b/src/server/routes/backend-wallet/sendTransactionBatch.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, Hex } from "thirdweb"; -import { insertTransaction } from "../../../utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { txOverridesWithValueSchema } from "../../schemas/txOverrides"; diff --git a/src/server/routes/backend-wallet/signMessage.ts b/src/server/routes/backend-wallet/signMessage.ts index ac810a795..45f9cb69d 100644 --- a/src/server/routes/backend-wallet/signMessage.ts +++ b/src/server/routes/backend-wallet/signMessage.ts @@ -6,9 +6,9 @@ import { arbitrumSepolia } from "thirdweb/chains"; import { getWalletDetails, isSmartBackendWallet, -} from "../../../db/wallets/getWalletDetails"; -import { walletDetailsToAccount } from "../../../utils/account"; -import { getChain } from "../../../utils/chain"; +} from "../../../shared/db/wallets/getWalletDetails"; +import { walletDetailsToAccount } from "../../../shared/utils/account"; +import { getChain } from "../../../shared/utils/chain"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/signTransaction.ts b/src/server/routes/backend-wallet/signTransaction.ts index c6a73c2c2..7af06715e 100644 --- a/src/server/routes/backend-wallet/signTransaction.ts +++ b/src/server/routes/backend-wallet/signTransaction.ts @@ -2,13 +2,13 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Hex } from "thirdweb"; -import { getAccount } from "../../../utils/account"; +import { getAccount } from "../../../shared/utils/account"; import { getChecksumAddress, maybeBigInt, maybeInt, -} from "../../../utils/primitiveTypes"; -import { toTransactionType } from "../../../utils/sdk"; +} from "../../../shared/utils/primitiveTypes"; +import { toTransactionType } from "../../../shared/utils/sdk"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/signTypedData.ts b/src/server/routes/backend-wallet/signTypedData.ts index 6c4705eea..6033e309b 100644 --- a/src/server/routes/backend-wallet/signTypedData.ts +++ b/src/server/routes/backend-wallet/signTypedData.ts @@ -1,8 +1,8 @@ import type { TypedDataSigner } from "@ethersproject/abstract-signer"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getWallet } from "../../../utils/cache/getWallet"; +import { getWallet } from "../../../shared/utils/cache/getWallet"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/simulateTransaction.ts b/src/server/routes/backend-wallet/simulateTransaction.ts index e30e5d662..eec049d0f 100644 --- a/src/server/routes/backend-wallet/simulateTransaction.ts +++ b/src/server/routes/backend-wallet/simulateTransaction.ts @@ -3,8 +3,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; import type { Address, Hex } from "thirdweb"; -import { doSimulateTransaction } from "../../../utils/transaction/simulateQueuedTransaction"; -import type { QueuedTransaction } from "../../../utils/transaction/types"; +import { doSimulateTransaction } from "../../../shared/utils/transaction/simulateQueuedTransaction"; +import type { QueuedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; import { diff --git a/src/server/routes/backend-wallet/transfer.ts b/src/server/routes/backend-wallet/transfer.ts index d45b6cd28..98a1f6fb4 100644 --- a/src/server/routes/backend-wallet/transfer.ts +++ b/src/server/routes/backend-wallet/transfer.ts @@ -10,11 +10,11 @@ import { } from "thirdweb"; import { transfer as transferERC20 } from "thirdweb/extensions/erc20"; import { isContractDeployed, resolvePromisedValue } from "thirdweb/utils"; -import { getChain } from "../../../utils/chain"; -import { normalizeAddress } from "../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../utils/sdk"; -import { insertTransaction } from "../../../utils/transaction/insertTransaction"; -import type { InsertedTransaction } from "../../../utils/transaction/types"; +import { getChain } from "../../../shared/utils/chain"; +import { normalizeAddress } from "../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../shared/utils/sdk"; +import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; +import type { InsertedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; import { TokenAmountStringSchema } from "../../schemas/number"; diff --git a/src/server/routes/backend-wallet/update.ts b/src/server/routes/backend-wallet/update.ts index 5c916d8d8..8baabfacf 100644 --- a/src/server/routes/backend-wallet/update.ts +++ b/src/server/routes/backend-wallet/update.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateWalletDetails } from "../../../db/wallets/updateWalletDetails"; +import { updateWalletDetails } from "../../../shared/db/wallets/updateWalletDetails"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/withdraw.ts b/src/server/routes/backend-wallet/withdraw.ts index e7815ac72..0cfe6fe36 100644 --- a/src/server/routes/backend-wallet/withdraw.ts +++ b/src/server/routes/backend-wallet/withdraw.ts @@ -9,12 +9,12 @@ import { } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { getWalletBalance } from "thirdweb/wallets"; -import { getAccount } from "../../../utils/account"; -import { getChain } from "../../../utils/chain"; -import { logger } from "../../../utils/logger"; -import { getChecksumAddress } from "../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../utils/sdk"; -import type { PopulatedTransaction } from "../../../utils/transaction/types"; +import { getAccount } from "../../../shared/utils/account"; +import { getChain } from "../../../shared/utils/chain"; +import { logger } from "../../../shared/utils/logger"; +import { getChecksumAddress } from "../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../shared/utils/sdk"; +import type { PopulatedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../schemas/address"; import { TokenAmountStringSchema } from "../../schemas/number"; diff --git a/src/server/routes/chain/get.ts b/src/server/routes/chain/get.ts index b01c90bed..c271613a3 100644 --- a/src/server/routes/chain/get.ts +++ b/src/server/routes/chain/get.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getChainMetadata } from "thirdweb/chains"; -import { getChain } from "../../../utils/chain"; +import { getChain } from "../../../shared/utils/chain"; import { chainRequestQuerystringSchema, chainResponseSchema, diff --git a/src/server/routes/chain/getAll.ts b/src/server/routes/chain/getAll.ts index e1b85cf0d..c5644f337 100644 --- a/src/server/routes/chain/getAll.ts +++ b/src/server/routes/chain/getAll.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { fetchChains } from "@thirdweb-dev/chains"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; import { chainResponseSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/auth/get.ts b/src/server/routes/configuration/auth/get.ts index 9f8bc0f32..23163fa35 100644 --- a/src/server/routes/configuration/auth/get.ts +++ b/src/server/routes/configuration/auth/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/auth/update.ts b/src/server/routes/configuration/auth/update.ts index 411dd683f..07ab148b3 100644 --- a/src/server/routes/configuration/auth/update.ts +++ b/src/server/routes/configuration/auth/update.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +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/get.ts b/src/server/routes/configuration/backend-wallet-balance/get.ts index 1fce8a8ee..ab430ecc4 100644 --- a/src/server/routes/configuration/backend-wallet-balance/get.ts +++ b/src/server/routes/configuration/backend-wallet-balance/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/backend-wallet-balance/update.ts b/src/server/routes/configuration/backend-wallet-balance/update.ts index edb386e9d..e47a75af6 100644 --- a/src/server/routes/configuration/backend-wallet-balance/update.ts +++ b/src/server/routes/configuration/backend-wallet-balance/update.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { WeiAmountStringSchema } from "../../../schemas/number"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cache/get.ts b/src/server/routes/configuration/cache/get.ts index 2d4542585..5ff178bd0 100644 --- a/src/server/routes/configuration/cache/get.ts +++ b/src/server/routes/configuration/cache/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/cache/update.ts b/src/server/routes/configuration/cache/update.ts index 96d34db0b..a87ef1546 100644 --- a/src/server/routes/configuration/cache/update.ts +++ b/src/server/routes/configuration/cache/update.ts @@ -1,10 +1,10 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; -import { clearCacheCron } from "../../../../utils/cron/clearCacheCron"; -import { isValidCron } from "../../../../utils/cron/isValidCron"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { clearCacheCron } from "../../../../shared/utils/cron/clearCacheCron"; +import { isValidCron } from "../../../../shared/utils/cron/isValidCron"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/chains/get.ts b/src/server/routes/configuration/chains/get.ts index 588927206..6b38f9139 100644 --- a/src/server/routes/configuration/chains/get.ts +++ b/src/server/routes/configuration/chains/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { chainResponseSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/chains/update.ts b/src/server/routes/configuration/chains/update.ts index 5ae3ed225..589eb0797 100644 --- a/src/server/routes/configuration/chains/update.ts +++ b/src/server/routes/configuration/chains/update.ts @@ -1,9 +1,9 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; -import { sdkCache } from "../../../../utils/cache/getSdk"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { sdkCache } from "../../../../shared/utils/cache/getSdk"; import { chainResponseSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/contract-subscriptions/get.ts b/src/server/routes/configuration/contract-subscriptions/get.ts index 36d42d582..ae6dc97dc 100644 --- a/src/server/routes/configuration/contract-subscriptions/get.ts +++ b/src/server/routes/configuration/contract-subscriptions/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { contractSubscriptionConfigurationSchema, standardResponseSchema, diff --git a/src/server/routes/configuration/contract-subscriptions/update.ts b/src/server/routes/configuration/contract-subscriptions/update.ts index 501ce8b4b..fdc0897d0 100644 --- a/src/server/routes/configuration/contract-subscriptions/update.ts +++ b/src/server/routes/configuration/contract-subscriptions/update.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { contractSubscriptionConfigurationSchema, diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index aace6cb26..24d085d07 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cors/get.ts b/src/server/routes/configuration/cors/get.ts index 37a1aa9bb..f5cbab52b 100644 --- a/src/server/routes/configuration/cors/get.ts +++ b/src/server/routes/configuration/cors/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +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 d32a819ef..a1d4c7c98 100644 --- a/src/server/routes/configuration/cors/remove.ts +++ b/src/server/routes/configuration/cors/remove.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index 54ddf3e84..a1a7540bc 100644 --- a/src/server/routes/configuration/cors/set.ts +++ b/src/server/routes/configuration/cors/set.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/ip/get.ts b/src/server/routes/configuration/ip/get.ts index 99250011e..1f916c14f 100644 --- a/src/server/routes/configuration/ip/get.ts +++ b/src/server/routes/configuration/ip/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/ip/set.ts b/src/server/routes/configuration/ip/set.ts index e92a319ce..8dab64868 100644 --- a/src/server/routes/configuration/ip/set.ts +++ b/src/server/routes/configuration/ip/set.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/transactions/get.ts b/src/server/routes/configuration/transactions/get.ts index 33cdfeac3..c1d95ff5e 100644 --- a/src/server/routes/configuration/transactions/get.ts +++ b/src/server/routes/configuration/transactions/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/transactions/update.ts b/src/server/routes/configuration/transactions/update.ts index c94db43ce..c5322dca4 100644 --- a/src/server/routes/configuration/transactions/update.ts +++ b/src/server/routes/configuration/transactions/update.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Partial( diff --git a/src/server/routes/configuration/wallets/get.ts b/src/server/routes/configuration/wallets/get.ts index d170cbea5..eded75a5e 100644 --- a/src/server/routes/configuration/wallets/get.ts +++ b/src/server/routes/configuration/wallets/get.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { WalletType } from "../../../../schema/wallet"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { WalletType } from "../../../../shared/schemas/wallet"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/wallets/update.ts b/src/server/routes/configuration/wallets/update.ts index d21182227..9b79e6146 100644 --- a/src/server/routes/configuration/wallets/update.ts +++ b/src/server/routes/configuration/wallets/update.ts @@ -1,9 +1,9 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { WalletType } from "../../../../schema/wallet"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { WalletType } from "../../../../shared/schemas/wallet"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/contract/events/getAllEvents.ts b/src/server/routes/contract/events/getAllEvents.ts index a28264b45..5d6150779 100644 --- a/src/server/routes/contract/events/getAllEvents.ts +++ b/src/server/routes/contract/events/getAllEvents.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { contractEventSchema, eventsQuerystringSchema, diff --git a/src/server/routes/contract/events/getContractEventLogs.ts b/src/server/routes/contract/events/getContractEventLogs.ts index 85e0a0c3c..47a12a269 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 "../../../../db/contractEventLogs/getContractEventLogs"; -import { isContractSubscribed } from "../../../../db/contractSubscriptions/getContractSubscriptions"; +import { getContractEventLogsByBlockAndTopics } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; +import { isContractSubscribed } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; 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 2cde46d21..267ab1eb8 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 "../../../../db/contractEventLogs/getContractEventLogs"; +import { getEventLogsByBlockTimestamp } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; import { AddressSchema } from "../../../schemas/address"; import { eventLogSchema } from "../../../schemas/eventLog"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/contract/events/getEvents.ts b/src/server/routes/contract/events/getEvents.ts index f30839eba..69cabe01c 100644 --- a/src/server/routes/contract/events/getEvents.ts +++ b/src/server/routes/contract/events/getEvents.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { contractEventSchema, eventsQuerystringSchema, diff --git a/src/server/routes/contract/events/paginateEventLogs.ts b/src/server/routes/contract/events/paginateEventLogs.ts index 02a4c5212..1767a4c07 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 "../../../../db/configuration/getConfiguration"; -import { getEventLogsByCursor } from "../../../../db/contractEventLogs/getContractEventLogs"; +import { getConfiguration } from "../../../../shared/db/configuration/getConfiguration"; +import { getEventLogsByCursor } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; 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/read/getAllAdmins.ts b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts index 13d5d38a2..ea6428780 100644 --- a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts +++ b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/account/read/getAllSessions.ts b/src/server/routes/contract/extensions/account/read/getAllSessions.ts index fd3bd971a..68db22c51 100644 --- a/src/server/routes/contract/extensions/account/read/getAllSessions.ts +++ b/src/server/routes/contract/extensions/account/read/getAllSessions.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/grantAdmin.ts b/src/server/routes/contract/extensions/account/write/grantAdmin.ts index 6d5b11e82..2a7120ca8 100644 --- a/src/server/routes/contract/extensions/account/write/grantAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/grantAdmin.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/grantSession.ts b/src/server/routes/contract/extensions/account/write/grantSession.ts index 0e64558d7..ab04cfcfa 100644 --- a/src/server/routes/contract/extensions/account/write/grantSession.ts +++ b/src/server/routes/contract/extensions/account/write/grantSession.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts index 2e21671aa..2b19ee104 100644 --- a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/revokeSession.ts b/src/server/routes/contract/extensions/account/write/revokeSession.ts index f71e40218..58c74d8c7 100644 --- a/src/server/routes/contract/extensions/account/write/revokeSession.ts +++ b/src/server/routes/contract/extensions/account/write/revokeSession.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/updateSession.ts b/src/server/routes/contract/extensions/account/write/updateSession.ts index 46da67695..daade19b1 100644 --- a/src/server/routes/contract/extensions/account/write/updateSession.ts +++ b/src/server/routes/contract/extensions/account/write/updateSession.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts index 5a5208679..7fd003c0d 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts index 66f1ad35a..d3a9020cd 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts index 0ccbbde66..bce8ff614 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts b/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts index e4f0089aa..e540a46f0 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { predictAddress } from "thirdweb/wallets/smart"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts b/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts index 55f2c34d6..1eb2a60b4 100644 --- a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts +++ b/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { createAccount as factoryCreateAccount } from "thirdweb/extensions/erc4337"; import { isHex, stringToHex } from "thirdweb/utils"; import { predictAddress } from "thirdweb/wallets/smart"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { redis } from "../../../../../../utils/redis/redis"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { redis } from "../../../../../../shared/utils/redis/redis"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { prebuiltDeployResponseSchema } from "../../../../../schemas/prebuilts"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts index 635da28ae..2cfa5c07a 100644 --- a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts index 5b100dd11..c5bcba524 100644 --- a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/get.ts b/src/server/routes/contract/extensions/erc1155/read/get.ts index c9edfafca..acb439591 100644 --- a/src/server/routes/contract/extensions/erc1155/read/get.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts index 62f7807b4..739707d3c 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getAll.ts b/src/server/routes/contract/extensions/erc1155/read/getAll.ts index 8d1018a5b..42b563c1f 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc1155/read/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 { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts index 5bc021d5d..9003f2db4 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts index d50a6af03..8b061be03 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts index 59a130fb0..05e53b95e 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts index e56383bd0..d4a8f08dc 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts index f97a3089a..ac1fac7dd 100644 --- a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts index 85e8b8d7b..ab95c40e3 100644 --- a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts @@ -4,11 +4,11 @@ import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import type { NFTInput } from "thirdweb/dist/types/utils/nft/parseNft"; import { generateMintSignature } from "thirdweb/extensions/erc1155"; -import { getAccount } from "../../../../../../utils/account"; -import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; -import { getChain } from "../../../../../../utils/chain"; -import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; +import { getAccount } from "../../../../../../shared/utils/account"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts index ca225d4e9..21b24ad92 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts index 54de23b04..e1dafd5cf 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts index d8e60a5ec..5164f0a83 100644 --- a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts +++ b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burn.ts b/src/server/routes/contract/extensions/erc1155/write/burn.ts index 7c1a126df..d01ea058d 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burn.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts index d4dedc504..a78cb430c 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts index 39bd1e4a4..c716b1f61 100644 --- a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts @@ -1,10 +1,10 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc1155"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; 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 015284d09..b31c48bf1 100644 --- a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts index f48e90bea..58fa670ab 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts index 1d31b92aa..e8776756a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts index 0f72457f8..776156ca0 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts index db5a05f60..510469914 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts index 702c5ae4e..36e81475b 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type setBatchSantiziedClaimConditionsRequestSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts index cf014efaf..6f3021397 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts index adc3ed3e8..b1e12fb4b 100644 --- a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts @@ -3,8 +3,8 @@ 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 "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { signature1155OutputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/transfer.ts b/src/server/routes/contract/extensions/erc1155/write/transfer.ts index 4db2395ec..61d46227a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Hex } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema, HexSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts index 385857075..66229cc15 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Hex } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema, HexSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts index 21bb87a40..ce3e63e10 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts index 3c020ff24..0689517fa 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts index 128fd9f86..8386bc054 100644 --- a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts index edade3a9f..167ec4cf4 100644 --- a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/canClaim.ts b/src/server/routes/contract/extensions/erc20/read/canClaim.ts index b38495b17..078c8d7f2 100644 --- a/src/server/routes/contract/extensions/erc20/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc20/read/canClaim.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/get.ts b/src/server/routes/contract/extensions/erc20/read/get.ts index c89338d37..88f532f0b 100644 --- a/src/server/routes/contract/extensions/erc20/read/get.ts +++ b/src/server/routes/contract/extensions/erc20/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts index 8013f7cff..15a992342 100644 --- a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts index 578466a13..841ebcda3 100644 --- a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts index 832ce01ef..19b7a12de 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts index ad7659b05..0778a85ac 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts index 341aabf9d..ae6ccff36 100644 --- a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc20"; -import { getAccount } from "../../../../../../utils/account"; -import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; -import { getChain } from "../../../../../../utils/chain"; -import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; +import { getAccount } from "../../../../../../shared/utils/account"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { signature20InputSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts index fd3399e97..06ee4548b 100644 --- a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burn.ts b/src/server/routes/contract/extensions/erc20/write/burn.ts index 54ad7e7ce..7c9f093f7 100644 --- a/src/server/routes/contract/extensions/erc20/write/burn.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts index 956d9f9b3..ad5498414 100644 --- a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/claimTo.ts b/src/server/routes/contract/extensions/erc20/write/claimTo.ts index fd5a70ffd..db7678729 100644 --- a/src/server/routes/contract/extensions/erc20/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/claimTo.ts @@ -1,10 +1,10 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc20"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { erc20ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts index 2fd89eb9c..dd3e4b601 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/mintTo.ts b/src/server/routes/contract/extensions/erc20/write/mintTo.ts index db3a9968e..e78dfb90f 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintTo.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts index 80fd18b02..7cad12a44 100644 --- a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts +++ b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts index 57ce2c8c8..cc6ced02c 100644 --- a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts index 38fd423ff..182259b9b 100644 --- a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts @@ -3,8 +3,8 @@ 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 "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { signature20OutputSchema } from "../../../../../schemas/erc20"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/transfer.ts b/src/server/routes/contract/extensions/erc20/write/transfer.ts index 512903a44..75a3c2d14 100644 --- a/src/server/routes/contract/extensions/erc20/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc20/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transfer } from "thirdweb/extensions/erc20"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { TokenAmountStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts index ce9ed134c..ec1c46403 100644 --- a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc20"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { TokenAmountStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts index 99cd79b48..96ec7578d 100644 --- a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts index 72b9e2aef..1bad0235d 100644 --- a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc721ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/canClaim.ts b/src/server/routes/contract/extensions/erc721/read/canClaim.ts index d80226ccd..6aa53c54d 100644 --- a/src/server/routes/contract/extensions/erc721/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc721/read/canClaim.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/get.ts b/src/server/routes/contract/extensions/erc721/read/get.ts index 11faf6bdc..e5f332ab2 100644 --- a/src/server/routes/contract/extensions/erc721/read/get.ts +++ b/src/server/routes/contract/extensions/erc721/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts index 88164318d..f24521b3d 100644 --- a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getAll.ts b/src/server/routes/contract/extensions/erc721/read/getAll.ts index 043db6f74..4eb8bacab 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc721/read/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 { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts index 9158456f5..8d4a62f0e 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts index c4b069987..88d552910 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts index eee8854cd..d39672dac 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/getOwned.ts b/src/server/routes/contract/extensions/erc721/read/getOwned.ts index 847d69c36..311ef318c 100644 --- a/src/server/routes/contract/extensions/erc721/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc721/read/getOwned.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/isApproved.ts b/src/server/routes/contract/extensions/erc721/read/isApproved.ts index b8ecc6e8a..22d3cbecd 100644 --- a/src/server/routes/contract/extensions/erc721/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc721/read/isApproved.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts index 0fca0a1f2..281399a7e 100644 --- a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc721"; -import { getAccount } from "../../../../../../utils/account"; -import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; -import { getChain } from "../../../../../../utils/chain"; -import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; +import { getAccount } from "../../../../../../shared/utils/account"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { signature721InputSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts index 0636354a2..5cb0d632f 100644 --- a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts +++ b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts @@ -17,9 +17,9 @@ import { import { decimals } from "thirdweb/extensions/erc20"; import { upload } from "thirdweb/storage"; import { checksumAddress } from "thirdweb/utils"; -import { getChain } from "../../../../../../utils/chain"; -import { prettifyError } from "../../../../../../utils/error"; -import { thirdwebClient } from "../../../../../../utils/sdk"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { prettifyError } from "../../../../../../shared/utils/error"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { signature721InputSchemaV5, diff --git a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts index 94d6d91bb..342f63448 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/totalCount.ts b/src/server/routes/contract/extensions/erc721/read/totalCount.ts index 7599028de..5a6cd5809 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts index 5eb39d2c7..88c4b12f8 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/burn.ts b/src/server/routes/contract/extensions/erc721/write/burn.ts index f0591eafa..259ba1af1 100644 --- a/src/server/routes/contract/extensions/erc721/write/burn.ts +++ b/src/server/routes/contract/extensions/erc721/write/burn.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/claimTo.ts b/src/server/routes/contract/extensions/erc721/write/claimTo.ts index a18780e08..1366bb9cb 100644 --- a/src/server/routes/contract/extensions/erc721/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/claimTo.ts @@ -1,10 +1,10 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc721"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; 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 c553454f8..7f22c2eae 100644 --- a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts index 79c14a801..38e5aa299 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mintTo.ts index 8099991eb..dc48f446a 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintTo.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts index b521adf4d..3f3c29c8f 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts index 8b3f8e7b3..ad7fd5aa8 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts index 8e67bdaae..42afb844d 100644 --- a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts @@ -1,11 +1,11 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, - sanitizedClaimConditionInputSchema, + type sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts index 2a85bb169..808c14246 100644 --- a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts @@ -1,16 +1,16 @@ -import { Static, Type } from "@sinclair/typebox"; -import { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk"; +import { type Static, Type } from "@sinclair/typebox"; +import type { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address, Hex } from "thirdweb"; +import type { Address, Hex } from "thirdweb"; import { mintWithSignature } from "thirdweb/extensions/erc721"; import { resolvePromisedValue } from "thirdweb/utils"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { insertTransaction } from "../../../../../../utils/transaction/insertTransaction"; -import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { insertTransaction } from "../../../../../../shared/utils/transaction/insertTransaction"; +import type { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { signature721OutputSchema } from "../../../../../schemas/nft"; import { signature721OutputSchemaV5 } from "../../../../../schemas/nft/v5"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/transfer.ts b/src/server/routes/contract/extensions/erc721/write/transfer.ts index 60f00d5bb..87835ca09 100644 --- a/src/server/routes/contract/extensions/erc721/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc721/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts index 404086221..e19e8cb9d 100644 --- a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts index 8b8faaa49..d9c9fb6f7 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts @@ -1,11 +1,11 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, - sanitizedClaimConditionInputSchema, + type sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts index 48ba8e64f..c8a610821 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts index 500b976c6..5debad7eb 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/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 { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts index 6b3182668..a7e35ab5d 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts index 73397c27f..cd7b396bd 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts index 1d6228f9c..c46910f28 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts index 05ff2336a..4b261a5a3 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts index 02b353a97..3351dd6d7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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 c9b697a25..f723caadc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 75ff756b8..37ab99780 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 17222f50a..af6a96951 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 74c7f63d8..141feddad 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, 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 79cd57d3d..607afb958 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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 048a81b78..705463bf4 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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 63db76bd4..c58104607 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts index 674368c5b..f7ebc52d2 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/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 { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts index d99b58077..25a65fcc1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts index 0b0ffc488..53353271c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts index 81193e015..de9247202 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts index f17418ec2..c02d495e9 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { currencyValueSchema, marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts index e44013962..4813b190c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts index 6781ca0d1..95d4e19ed 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts index 9c117f18c..6f839ff0c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { bidSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts index 08c3b6e20..a70f469a6 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, 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 64a931d47..142d5a6f3 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 df6f44c71..dbcd85bec 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 1b5236a93..f0131cb06 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 32ad9f01a..0485e4151 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 b348b1b1d..f74f0ad23 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts @@ -1,8 +1,8 @@ import type { Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionInputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, 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 19e591eeb..9770164ef 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 7545db42e..8eabd7456 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts index 6497ed6d5..e4b9271c7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/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 { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts index e913d2911..01c1b6bcd 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts index 4eb1991cb..d752431fc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts index 86f476220..ada1fb3e6 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, 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 f1614a731..7eed54d24 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 aa205c3ac..0f81e3138 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 3cc4deb43..daa44c8c1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3InputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index 56cbb5b10..f642809bf 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { abiSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/metadata/events.ts b/src/server/routes/contract/metadata/events.ts index 0d3e769fa..f16d65e2f 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { abiEventSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/metadata/extensions.ts b/src/server/routes/contract/metadata/extensions.ts index 79255c7f8..d4d553173 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { getAllDetectedExtensionNames } from "@thirdweb-dev/sdk"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/metadata/functions.ts b/src/server/routes/contract/metadata/functions.ts index 268254418..3d45736ba 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { abiFunctionSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/read/read.ts b/src/server/routes/contract/read/read.ts index 89b0e115d..81721a098 100644 --- a/src/server/routes/contract/read/read.ts +++ b/src/server/routes/contract/read/read.ts @@ -1,8 +1,8 @@ import { Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; -import { prettifyError } from "../../../../utils/error"; +import { getContract } from "../../../../shared/utils/cache/getContract"; +import { prettifyError } from "../../../../shared/utils/error"; import { createCustomError } from "../../../middleware/error"; import { readRequestQuerySchema, diff --git a/src/server/routes/contract/roles/read/get.ts b/src/server/routes/contract/roles/read/get.ts index a10b1e827..f07c1479f 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/roles/read/getAll.ts b/src/server/routes/contract/roles/read/getAll.ts index 175b626df..ee4a8d920 100644 --- a/src/server/routes/contract/roles/read/getAll.ts +++ b/src/server/routes/contract/roles/read/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 { getContract } from "../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { rolesResponseSchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/roles/write/grant.ts b/src/server/routes/contract/roles/write/grant.ts index c82ad2269..538b2d869 100644 --- a/src/server/routes/contract/roles/write/grant.ts +++ b/src/server/routes/contract/roles/write/grant.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/roles/write/revoke.ts b/src/server/routes/contract/roles/write/revoke.ts index 4b1173132..063f9c8e1 100644 --- a/src/server/routes/contract/roles/write/revoke.ts +++ b/src/server/routes/contract/roles/write/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 { queueTx } from "../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts index c6282d135..ed85d8712 100644 --- a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts index fec257ad5..163ae5fee 100644 --- a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts index acfb5c8fd..239c08778 100644 --- a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts index 4d12d72b0..6ff5d09c2 100644 --- a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/addContractSubscription.ts index bddd24fc1..05637d75f 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/addContractSubscription.ts @@ -1,16 +1,16 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { isContractDeployed } from "thirdweb/utils"; -import { upsertChainIndexer } from "../../../../db/chainIndexers/upsertChainIndexer"; -import { createContractSubscription } from "../../../../db/contractSubscriptions/createContractSubscription"; -import { getContractSubscriptionsUniqueChainIds } from "../../../../db/contractSubscriptions/getContractSubscriptions"; -import { insertWebhook } from "../../../../db/webhooks/createWebhook"; -import { WebhooksEventTypes } from "../../../../schema/webhooks"; -import { getSdk } from "../../../../utils/cache/getSdk"; -import { getChain } from "../../../../utils/chain"; -import { thirdwebClient } from "../../../../utils/sdk"; +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 { WebhooksEventTypes } from "../../../../shared/schemas/webhooks"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { getChain } from "../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts index e708cd8b2..66a5f0cb8 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 "../../../../db/contractEventLogs/getContractEventLogs"; +import { getContractEventLogsIndexedBlockRange } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; 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 81fb1ac2d..d542ee9a2 100644 --- a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts +++ b/src/server/routes/contract/subscriptions/getContractSubscriptions.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getAllContractSubscriptions } from "../../../../db/contractSubscriptions/getContractSubscriptions"; +import { getAllContractSubscriptions } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; import { contractSubscriptionSchema, toContractSubscriptionSchema, diff --git a/src/server/routes/contract/subscriptions/getLatestBlock.ts b/src/server/routes/contract/subscriptions/getLatestBlock.ts index 49f81e09c..1cea5a453 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 "../../../../db/chainIndexers/getChainIndexer"; +import { getLastIndexedBlock } from "../../../../shared/db/chainIndexers/getChainIndexer"; 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 3b0711c75..488b2d68c 100644 --- a/src/server/routes/contract/subscriptions/removeContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/removeContractSubscription.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { deleteContractSubscription } from "../../../../db/contractSubscriptions/deleteContractSubscription"; -import { deleteWebhook } from "../../../../db/webhooks/revokeWebhook"; +import { deleteContractSubscription } from "../../../../shared/db/contractSubscriptions/deleteContractSubscription"; +import { deleteWebhook } from "../../../../shared/db/webhooks/revokeWebhook"; 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 87b90a530..d0267226d 100644 --- a/src/server/routes/contract/transactions/getTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/getTransactionReceipts.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { isContractSubscribed } from "../../../../db/contractSubscriptions/getContractSubscriptions"; -import { getContractTransactionReceiptsByBlock } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; +import { isContractSubscribed } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getContractTransactionReceiptsByBlock } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; 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 2c76ec6da..5a9f55393 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 "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; +import { getTransactionReceiptsByBlockTimestamp } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; 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 0d13b9b1d..6aca2a842 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 "../../../../db/configuration/getConfiguration"; -import { getTransactionReceiptsByCursor } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; +import { getConfiguration } from "../../../../shared/db/configuration/getConfiguration"; +import { getTransactionReceiptsByCursor } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/contract/write/write.ts b/src/server/routes/contract/write/write.ts index b47049786..3f928832f 100644 --- a/src/server/routes/contract/write/write.ts +++ b/src/server/routes/contract/write/write.ts @@ -3,9 +3,9 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prepareContractCall, resolveMethod } from "thirdweb"; import { parseAbiParams, type AbiFunction } from "thirdweb/utils"; -import { getContractV5 } from "../../../../utils/cache/getContractv5"; -import { prettifyError } from "../../../../utils/error"; -import { queueTransaction } from "../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../shared/utils/cache/getContractv5"; +import { prettifyError } from "../../../../shared/utils/error"; +import { queueTransaction } from "../../../../shared/utils/transaction/queueTransation"; import { createCustomError } from "../../../middleware/error"; import { abiArraySchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilt.ts b/src/server/routes/deploy/prebuilt.ts index 38815a755..271d298b7 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../db/transactions/queueTx"; -import { getSdk } from "../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../shared/utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/edition.ts b/src/server/routes/deploy/prebuilts/edition.ts index 15b99b65b..611437a7b 100644 --- a/src/server/routes/deploy/prebuilts/edition.ts +++ b/src/server/routes/deploy/prebuilts/edition.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/editionDrop.ts b/src/server/routes/deploy/prebuilts/editionDrop.ts index 9e2c11bbd..8ffa11299 100644 --- a/src/server/routes/deploy/prebuilts/editionDrop.ts +++ b/src/server/routes/deploy/prebuilts/editionDrop.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/marketplaceV3.ts b/src/server/routes/deploy/prebuilts/marketplaceV3.ts index 8635946c9..8d70769a9 100644 --- a/src/server/routes/deploy/prebuilts/marketplaceV3.ts +++ b/src/server/routes/deploy/prebuilts/marketplaceV3.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/multiwrap.ts b/src/server/routes/deploy/prebuilts/multiwrap.ts index 95df0dd8a..beb778bda 100644 --- a/src/server/routes/deploy/prebuilts/multiwrap.ts +++ b/src/server/routes/deploy/prebuilts/multiwrap.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/nftCollection.ts b/src/server/routes/deploy/prebuilts/nftCollection.ts index 002f6e629..d12c2ec63 100644 --- a/src/server/routes/deploy/prebuilts/nftCollection.ts +++ b/src/server/routes/deploy/prebuilts/nftCollection.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/nftDrop.ts b/src/server/routes/deploy/prebuilts/nftDrop.ts index 740df4fe8..19ca2a2f2 100644 --- a/src/server/routes/deploy/prebuilts/nftDrop.ts +++ b/src/server/routes/deploy/prebuilts/nftDrop.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/pack.ts b/src/server/routes/deploy/prebuilts/pack.ts index 1c7c0e44f..9e5eedbec 100644 --- a/src/server/routes/deploy/prebuilts/pack.ts +++ b/src/server/routes/deploy/prebuilts/pack.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/signatureDrop.ts b/src/server/routes/deploy/prebuilts/signatureDrop.ts index f5f54d385..f7a4a6290 100644 --- a/src/server/routes/deploy/prebuilts/signatureDrop.ts +++ b/src/server/routes/deploy/prebuilts/signatureDrop.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/split.ts b/src/server/routes/deploy/prebuilts/split.ts index 8b9435a3e..8184c0699 100644 --- a/src/server/routes/deploy/prebuilts/split.ts +++ b/src/server/routes/deploy/prebuilts/split.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/token.ts b/src/server/routes/deploy/prebuilts/token.ts index 13980f951..50fde94fb 100644 --- a/src/server/routes/deploy/prebuilts/token.ts +++ b/src/server/routes/deploy/prebuilts/token.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/tokenDrop.ts b/src/server/routes/deploy/prebuilts/tokenDrop.ts index 6129ecfa7..73f55b682 100644 --- a/src/server/routes/deploy/prebuilts/tokenDrop.ts +++ b/src/server/routes/deploy/prebuilts/tokenDrop.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/vote.ts b/src/server/routes/deploy/prebuilts/vote.ts index 2073993cd..fce36471f 100644 --- a/src/server/routes/deploy/prebuilts/vote.ts +++ b/src/server/routes/deploy/prebuilts/vote.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/published.ts b/src/server/routes/deploy/published.ts index 96fd698bb..13a313541 100644 --- a/src/server/routes/deploy/published.ts +++ b/src/server/routes/deploy/published.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +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 "../../../db/transactions/queueTx"; -import { getSdk } from "../../../utils/cache/getSdk"; +import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { publishedDeployParamSchema, diff --git a/src/server/routes/relayer/create.ts b/src/server/routes/relayer/create.ts index 1cda9f9b1..f7b34d05f 100644 --- a/src/server/routes/relayer/create.ts +++ b/src/server/routes/relayer/create.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { prisma } from "../../../db/client"; +import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; import { chainIdOrSlugSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/relayer/getAll.ts b/src/server/routes/relayer/getAll.ts index 55fba56d8..3798b5e67 100644 --- a/src/server/routes/relayer/getAll.ts +++ b/src/server/routes/relayer/getAll.ts @@ -1,7 +1,7 @@ import { Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { prisma } from "../../../db/client"; +import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index 866f18ac8..604a0774d 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -8,10 +8,10 @@ import { ForwarderAbi, ForwarderAbiEIP712ChainlessDomain, NativeMetaTransaction, -} from "../../../constants/relayer"; -import { getRelayerById } from "../../../db/relayer/getRelayerById"; -import { queueTx } from "../../../db/transactions/queueTx"; -import { getSdk } from "../../../utils/cache/getSdk"; +} from "../../../shared/schemas/relayer"; +import { getRelayerById } from "../../../shared/db/relayer/getRelayerById"; +import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../shared/utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema, diff --git a/src/server/routes/relayer/revoke.ts b/src/server/routes/relayer/revoke.ts index c69b8515d..aa84eb1ad 100644 --- a/src/server/routes/relayer/revoke.ts +++ b/src/server/routes/relayer/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 { prisma } from "../../../db/client"; +import { prisma } from "../../../shared/db/client"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/relayer/update.ts b/src/server/routes/relayer/update.ts index aca004e0f..421ac46af 100644 --- a/src/server/routes/relayer/update.ts +++ b/src/server/routes/relayer/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 { prisma } from "../../../db/client"; +import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; import { chainIdOrSlugSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/system/health.ts b/src/server/routes/system/health.ts index 2106aecae..23672c92f 100644 --- a/src/server/routes/system/health.ts +++ b/src/server/routes/system/health.ts @@ -1,10 +1,10 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { isDatabaseReachable } from "../../../db/client"; -import { env } from "../../../utils/env"; -import { isRedisReachable } from "../../../utils/redis/redis"; -import { thirdwebClientId } from "../../../utils/sdk"; +import { isDatabaseReachable } from "../../../shared/db/client"; +import { env } from "../../../shared/utils/env"; +import { isRedisReachable } from "../../../shared/utils/redis/redis"; +import { thirdwebClientId } from "../../../shared/utils/sdk"; import { createCustomError } from "../../middleware/error"; type EngineFeature = diff --git a/src/server/routes/system/queue.ts b/src/server/routes/system/queue.ts index 92763139e..8c01d2302 100644 --- a/src/server/routes/system/queue.ts +++ b/src/server/routes/system/queue.ts @@ -1,9 +1,9 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getPercentile } from "../../../utils/math"; -import type { MinedTransaction } from "../../../utils/transaction/types"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getPercentile } from "../../../shared/utils/math"; +import type { MinedTransaction } from "../../../shared/utils/transaction/types"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/blockchain/getLogs.ts b/src/server/routes/transaction/blockchain/getLogs.ts index 26a185dab..099dc246d 100644 --- a/src/server/routes/transaction/blockchain/getLogs.ts +++ b/src/server/routes/transaction/blockchain/getLogs.ts @@ -12,10 +12,10 @@ import { type Hex, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import { TransactionReceipt } from "thirdweb/transaction"; -import { TransactionDB } from "../../../../db/transactions/db"; -import { getChain } from "../../../../utils/chain"; -import { thirdwebClient } from "../../../../utils/sdk"; +import type { TransactionReceipt } from "thirdweb/transaction"; +import { TransactionDB } from "../../../../shared/db/transactions/db"; +import { getChain } from "../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/getReceipt.ts b/src/server/routes/transaction/blockchain/getReceipt.ts index 13cfd7786..b5d3c4378 100644 --- a/src/server/routes/transaction/blockchain/getReceipt.ts +++ b/src/server/routes/transaction/blockchain/getReceipt.ts @@ -9,12 +9,12 @@ import { } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { TransactionReceipt } from "viem"; -import { getChain } from "../../../../utils/chain"; +import { getChain } from "../../../../shared/utils/chain"; import { fromTransactionStatus, fromTransactionType, thirdwebClient, -} from "../../../../utils/sdk"; +} from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts index 76c8c43a0..220add1ae 100644 --- a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts +++ b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../../../utils/env"; +import { env } from "../../../../shared/utils/env"; import { createCustomError } from "../../../middleware/error"; import { TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/sendSignedTx.ts b/src/server/routes/transaction/blockchain/sendSignedTx.ts index 5fc53a188..fe7e1ac83 100644 --- a/src/server/routes/transaction/blockchain/sendSignedTx.ts +++ b/src/server/routes/transaction/blockchain/sendSignedTx.ts @@ -2,8 +2,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_sendRawTransaction, getRpcClient, isHex } from "thirdweb"; -import { getChain } from "../../../../utils/chain"; -import { thirdwebClient } from "../../../../utils/sdk"; +import { getChain } from "../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { TransactionHashSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts index f5b3b28a6..8db91f8e3 100644 --- a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts +++ b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts @@ -2,8 +2,8 @@ import { Type, type Static } from "@sinclair/typebox"; import { Value } from "@sinclair/typebox/value"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../../../utils/env"; -import { thirdwebClientId } from "../../../../utils/sdk"; +import { env } from "../../../../shared/utils/env"; +import { thirdwebClientId } from "../../../../shared/utils/sdk"; import { TransactionHashSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index d9b704383..cb49beb59 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -1,15 +1,15 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getBlockNumberish } from "../../../utils/block"; -import { getConfig } from "../../../utils/cache/getConfig"; -import { getChain } from "../../../utils/chain"; -import { msSince } from "../../../utils/date"; -import { sendCancellationTransaction } from "../../../utils/transaction/cancelTransaction"; -import type { CancelledTransaction } from "../../../utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../../utils/transaction/webhook"; -import { reportUsage } from "../../../utils/usage"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getBlockNumberish } from "../../../shared/utils/block"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getChain } from "../../../shared/utils/chain"; +import { msSince } from "../../../shared/utils/date"; +import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancelTransaction"; +import type { CancelledTransaction } from "../../../shared/utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; +import { reportUsage } from "../../../shared/utils/usage"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; diff --git a/src/server/routes/transaction/getAll.ts b/src/server/routes/transaction/getAll.ts index 5b58f5b3e..6243e0fc7 100644 --- a/src/server/routes/transaction/getAll.ts +++ b/src/server/routes/transaction/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 { TransactionDB } from "../../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { PaginationSchema } from "../../schemas/pagination"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/transaction/getAllDeployedContracts.ts b/src/server/routes/transaction/getAllDeployedContracts.ts index 4bcd88a61..d4745f9ad 100644 --- a/src/server/routes/transaction/getAllDeployedContracts.ts +++ b/src/server/routes/transaction/getAllDeployedContracts.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { TransactionSchema, diff --git a/src/server/routes/transaction/retry-failed.ts b/src/server/routes/transaction/retry-failed.ts index 5ac43c43b..1550a97ca 100644 --- a/src/server/routes/transaction/retry-failed.ts +++ b/src/server/routes/transaction/retry-failed.ts @@ -1,12 +1,12 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { getReceiptForEOATransaction, getReceiptForUserOp, -} from "../../../lib/transaction/get-transaction-receipt"; -import type { QueuedTransaction } from "../../../utils/transaction/types"; +} from "../../../shared/lib/transaction/get-transaction-receipt"; +import type { QueuedTransaction } from "../../../shared/utils/transaction/types"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/transaction/retry.ts b/src/server/routes/transaction/retry.ts index c8716e2dd..affd9a88c 100644 --- a/src/server/routes/transaction/retry.ts +++ b/src/server/routes/transaction/retry.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { maybeBigInt } from "../../../utils/primitiveTypes"; -import { SentTransaction } from "../../../utils/transaction/types"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { maybeBigInt } from "../../../shared/utils/primitiveTypes"; +import type { SentTransaction } from "../../../shared/utils/transaction/types"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/status.ts b/src/server/routes/transaction/status.ts index a5c9c1b95..616009cbf 100644 --- a/src/server/routes/transaction/status.ts +++ b/src/server/routes/transaction/status.ts @@ -1,9 +1,9 @@ -import { SocketStream } from "@fastify/websocket"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import type { SocketStream } from "@fastify/websocket"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { logger } from "../../../utils/logger"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { logger } from "../../../shared/utils/logger"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/transaction/sync-retry.ts b/src/server/routes/transaction/sync-retry.ts index 3eabdbd1e..e6ef887c4 100644 --- a/src/server/routes/transaction/sync-retry.ts +++ b/src/server/routes/transaction/sync-retry.ts @@ -2,15 +2,18 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { toSerializableTransaction } from "thirdweb"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getReceiptForEOATransaction } from "../../../lib/transaction/get-transaction-receipt"; -import { getAccount } from "../../../utils/account"; -import { getBlockNumberish } from "../../../utils/block"; -import { getChain } from "../../../utils/chain"; -import { getChecksumAddress, maybeBigInt } from "../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../utils/sdk"; -import type { SentTransaction } from "../../../utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../../utils/transaction/webhook"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getReceiptForEOATransaction } from "../../../shared/lib/transaction/get-transaction-receipt"; +import { getAccount } from "../../../shared/utils/account"; +import { getBlockNumberish } from "../../../shared/utils/block"; +import { getChain } from "../../../shared/utils/chain"; +import { + getChecksumAddress, + maybeBigInt, +} from "../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../shared/utils/sdk"; +import type { SentTransaction } from "../../../shared/utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; diff --git a/src/server/routes/webhooks/create.ts b/src/server/routes/webhooks/create.ts index a1cc44b32..b9e71f2a9 100644 --- a/src/server/routes/webhooks/create.ts +++ b/src/server/routes/webhooks/create.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { insertWebhook } from "../../../db/webhooks/createWebhook"; -import { WebhooksEventTypes } from "../../../schema/webhooks"; +import { insertWebhook } from "../../../shared/db/webhooks/createWebhook"; +import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { WebhookSchema, toWebhookSchema } from "../../schemas/webhook"; diff --git a/src/server/routes/webhooks/events.ts b/src/server/routes/webhooks/events.ts index 1e621e771..35f636d0b 100644 --- a/src/server/routes/webhooks/events.ts +++ b/src/server/routes/webhooks/events.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { WebhooksEventTypes } from "../../../schema/webhooks"; +import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/webhooks/getAll.ts b/src/server/routes/webhooks/getAll.ts index 9e22617f4..1c3c26149 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 "../../../db/webhooks/getAllWebhooks"; +import { getAllWebhooks } from "../../../shared/db/webhooks/getAllWebhooks"; 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 d6725c6ba..e3b220442 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 "../../../db/webhooks/getWebhook"; -import { deleteWebhook } from "../../../db/webhooks/revokeWebhook"; +import { getWebhook } from "../../../shared/db/webhooks/getWebhook"; +import { deleteWebhook } from "../../../shared/db/webhooks/revokeWebhook"; 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 68bc341c6..c70bbb5de 100644 --- a/src/server/routes/webhooks/test.ts +++ b/src/server/routes/webhooks/test.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 "../../../db/webhooks/getWebhook"; -import { sendWebhookRequest } from "../../../utils/webhook"; +import { getWebhook } from "../../../shared/db/webhooks/getWebhook"; +import { sendWebhookRequest } from "../../../shared/utils/webhook"; import { createCustomError } from "../../middleware/error"; import { NumberStringSchema } from "../../schemas/number"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/schemas/transaction/index.ts b/src/server/schemas/transaction/index.ts index c9dd5500c..c2ddb8825 100644 --- a/src/server/schemas/transaction/index.ts +++ b/src/server/schemas/transaction/index.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { Hex } from "thirdweb"; import { stringify } from "thirdweb/utils"; -import type { AnyTransaction } from "../../../utils/transaction/types"; +import type { AnyTransaction } from "../../../shared/utils/transaction/types"; import { AddressSchema, TransactionHashSchema } from "../address"; export const TransactionSchema = Type.Object({ diff --git a/src/server/schemas/wallet/index.ts b/src/server/schemas/wallet/index.ts index c4119fa61..3f4d940f4 100644 --- a/src/server/schemas/wallet/index.ts +++ b/src/server/schemas/wallet/index.ts @@ -1,6 +1,6 @@ import { Type } from "@sinclair/typebox"; import { getAddress, type Address } from "thirdweb"; -import { env } from "../../../utils/env"; +import { env } from "../../../shared/utils/env"; import { badAddressError } from "../../middleware/error"; import { AddressSchema } from "../address"; import { chainIdOrSlugSchema } from "../chain"; diff --git a/src/server/utils/chain.ts b/src/server/utils/chain.ts index 5ea5741d6..b0e5c7d7b 100644 --- a/src/server/utils/chain.ts +++ b/src/server/utils/chain.ts @@ -1,5 +1,5 @@ import { getChainBySlugAsync } from "@thirdweb-dev/chains"; -import { getChain } from "../../utils/chain"; +import { getChain } from "../../shared/utils/chain"; import { badChainError } from "../middleware/error"; /** diff --git a/src/server/utils/storage/localStorage.ts b/src/server/utils/storage/localStorage.ts index 8c5557faa..95665f675 100644 --- a/src/server/utils/storage/localStorage.ts +++ b/src/server/utils/storage/localStorage.ts @@ -1,8 +1,8 @@ import type { AsyncStorage } from "@thirdweb-dev/wallets"; import fs from "node:fs"; -import { prisma } from "../../../db/client"; -import { WalletType } from "../../../schema/wallet"; -import { logger } from "../../../utils/logger"; +import { prisma } from "../../../shared/db/client"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { logger } from "../../../shared/utils/logger"; /** * @deprecated @@ -38,7 +38,7 @@ export class LocalFileStorage implements AsyncStorage { logger({ service: "server", level: "error", - message: `No local wallet found!`, + message: "No local wallet found!", }); return null; } diff --git a/src/server/utils/transactionOverrides.ts b/src/server/utils/transactionOverrides.ts index a048504ed..83f728024 100644 --- a/src/server/utils/transactionOverrides.ts +++ b/src/server/utils/transactionOverrides.ts @@ -1,6 +1,6 @@ import type { Static } from "@sinclair/typebox"; -import { maybeBigInt } from "../../utils/primitiveTypes"; -import type { InsertedTransaction } from "../../utils/transaction/types"; +import { maybeBigInt } from "../../shared/utils/primitiveTypes"; +import type { InsertedTransaction } from "../../shared/utils/transaction/types"; import type { txOverridesSchema, txOverridesWithValueSchema, diff --git a/src/server/utils/wallets/createGcpKmsWallet.ts b/src/server/utils/wallets/createGcpKmsWallet.ts index 2b4b47201..bf4a249a2 100644 --- a/src/server/utils/wallets/createGcpKmsWallet.ts +++ b/src/server/utils/wallets/createGcpKmsWallet.ts @@ -1,7 +1,7 @@ import { KeyManagementServiceClient } from "@google-cloud/kms"; -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { WalletType } from "../../../schema/wallet"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { FetchGcpKmsWalletParamsError, fetchGcpKmsWalletParams, diff --git a/src/server/utils/wallets/createLocalWallet.ts b/src/server/utils/wallets/createLocalWallet.ts index 03392c1a6..c8b187171 100644 --- a/src/server/utils/wallets/createLocalWallet.ts +++ b/src/server/utils/wallets/createLocalWallet.ts @@ -1,9 +1,9 @@ import { encryptKeystore } from "@ethersproject/json-wallets"; import { privateKeyToAccount } from "thirdweb/wallets"; import { generatePrivateKey } from "viem/accounts"; -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { env } from "../../../utils/env"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { env } from "../../../shared/utils/env"; +import { thirdwebClient } from "../../../shared/utils/sdk"; interface CreateLocalWallet { label?: string; diff --git a/src/server/utils/wallets/createSmartWallet.ts b/src/server/utils/wallets/createSmartWallet.ts index 5859a430a..263c60f03 100644 --- a/src/server/utils/wallets/createSmartWallet.ts +++ b/src/server/utils/wallets/createSmartWallet.ts @@ -1,8 +1,8 @@ import { defineChain, type Address, type Chain } from "thirdweb"; import { smartWallet, type Account } from "thirdweb/wallets"; -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { WalletType } from "../../../schema/wallet"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; import { createAwsKmsKey, diff --git a/src/server/utils/wallets/fetchAwsKmsWalletParams.ts b/src/server/utils/wallets/fetchAwsKmsWalletParams.ts index f94cd0f1f..eea36e9ca 100644 --- a/src/server/utils/wallets/fetchAwsKmsWalletParams.ts +++ b/src/server/utils/wallets/fetchAwsKmsWalletParams.ts @@ -1,4 +1,4 @@ -import { getConfig } from "../../../utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; export type AwsKmsWalletParams = { awsAccessKeyId: string; diff --git a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts b/src/server/utils/wallets/fetchGcpKmsWalletParams.ts index b0c468ebc..a5f6de90b 100644 --- a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts +++ b/src/server/utils/wallets/fetchGcpKmsWalletParams.ts @@ -1,4 +1,4 @@ -import { getConfig } from "../../../utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; export type GcpKmsWalletParams = { gcpApplicationCredentialEmail: string; diff --git a/src/server/utils/wallets/getAwsKmsAccount.ts b/src/server/utils/wallets/getAwsKmsAccount.ts index 91e99104d..33d828ec7 100644 --- a/src/server/utils/wallets/getAwsKmsAccount.ts +++ b/src/server/utils/wallets/getAwsKmsAccount.ts @@ -17,7 +17,7 @@ import type { TypedDataDefinition, } from "viem"; import { hashTypedData } from "viem"; -import { getChain } from "../../../utils/chain"; +import { getChain } from "../../../shared/utils/chain"; type SendTransactionResult = { transactionHash: Hex; diff --git a/src/server/utils/wallets/getGcpKmsAccount.ts b/src/server/utils/wallets/getGcpKmsAccount.ts index b73135331..cf02625a7 100644 --- a/src/server/utils/wallets/getGcpKmsAccount.ts +++ b/src/server/utils/wallets/getGcpKmsAccount.ts @@ -17,7 +17,7 @@ import type { TypedDataDefinition, } from "viem"; import { hashTypedData } from "viem"; -import { getChain } from "../../../utils/chain"; // Adjust import path as needed +import { getChain } from "../../../shared/utils/chain"; // Adjust import path as needed type SendTransactionResult = { transactionHash: Hex; diff --git a/src/server/utils/wallets/getLocalWallet.ts b/src/server/utils/wallets/getLocalWallet.ts index 0f4456423..dd078f4e4 100644 --- a/src/server/utils/wallets/getLocalWallet.ts +++ b/src/server/utils/wallets/getLocalWallet.ts @@ -3,11 +3,11 @@ import { Wallet } from "ethers"; import type { Address } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { privateKeyToAccount, type Account } from "thirdweb/wallets"; -import { getWalletDetails } from "../../../db/wallets/getWalletDetails"; -import { getChain } from "../../../utils/chain"; -import { env } from "../../../utils/env"; -import { logger } from "../../../utils/logger"; -import { thirdwebClient } from "../../../utils/sdk"; +import { getWalletDetails } from "../../../shared/db/wallets/getWalletDetails"; +import { getChain } from "../../../shared/utils/chain"; +import { env } from "../../../shared/utils/env"; +import { logger } from "../../../shared/utils/logger"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { badChainError } from "../../middleware/error"; import { LocalFileStorage } from "../storage/localStorage"; diff --git a/src/server/utils/wallets/getSmartWallet.ts b/src/server/utils/wallets/getSmartWallet.ts index 59ab4d885..67db9f1d1 100644 --- a/src/server/utils/wallets/getSmartWallet.ts +++ b/src/server/utils/wallets/getSmartWallet.ts @@ -1,7 +1,7 @@ import { SmartWallet, type EVMWallet } from "@thirdweb-dev/wallets"; -import { getContract } from "../../../utils/cache/getContract"; -import { env } from "../../../utils/env"; -import { redis } from "../../../utils/redis/redis"; +import { getContract } from "../../../shared/utils/cache/getContract"; +import { env } from "../../../shared/utils/env"; +import { redis } from "../../../shared/utils/redis/redis"; interface GetSmartWalletParams { chainId: number; diff --git a/src/server/utils/wallets/importAwsKmsWallet.ts b/src/server/utils/wallets/importAwsKmsWallet.ts index 159db1a69..82d3969b4 100644 --- a/src/server/utils/wallets/importAwsKmsWallet.ts +++ b/src/server/utils/wallets/importAwsKmsWallet.ts @@ -1,6 +1,6 @@ -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { WalletType } from "../../../schema/wallet"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; import { getAwsKmsAccount } from "./getAwsKmsAccount"; diff --git a/src/server/utils/wallets/importGcpKmsWallet.ts b/src/server/utils/wallets/importGcpKmsWallet.ts index 5ac149b55..d34d1f865 100644 --- a/src/server/utils/wallets/importGcpKmsWallet.ts +++ b/src/server/utils/wallets/importGcpKmsWallet.ts @@ -1,6 +1,6 @@ -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { WalletType } from "../../../schema/wallet"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { getGcpKmsAccount } from "./getGcpKmsAccount"; interface ImportGcpKmsWalletParams { diff --git a/src/server/utils/wallets/importLocalWallet.ts b/src/server/utils/wallets/importLocalWallet.ts index 3ad1c7a6e..a917c484f 100644 --- a/src/server/utils/wallets/importLocalWallet.ts +++ b/src/server/utils/wallets/importLocalWallet.ts @@ -1,5 +1,5 @@ import { LocalWallet } from "@thirdweb-dev/wallets"; -import { env } from "../../../utils/env"; +import { env } from "../../../shared/utils/env"; import { LocalFileStorage } from "../storage/localStorage"; type ImportLocalWalletParams = diff --git a/src/server/utils/websocket.ts b/src/server/utils/websocket.ts index 4e68a198d..b18f1dd13 100644 --- a/src/server/utils/websocket.ts +++ b/src/server/utils/websocket.ts @@ -1,9 +1,9 @@ -import { SocketStream } from "@fastify/websocket"; -import { Static } from "@sinclair/typebox"; -import { FastifyRequest } from "fastify"; -import { logger } from "../../utils/logger"; -import { TransactionSchema } from "../schemas/transaction"; -import { UserSubscription, subscriptionsData } from "../schemas/websocket"; +import type { SocketStream } from "@fastify/websocket"; +import type { Static } from "@sinclair/typebox"; +import type { FastifyRequest } from "fastify"; +import { logger } from "../../shared/utils/logger"; +import type { TransactionSchema } from "../schemas/transaction"; +import { type UserSubscription, subscriptionsData } from "../schemas/websocket"; // websocket timeout, i.e., ws connection closed after 10 seconds const timeoutDuration = 10 * 60 * 1000; diff --git a/src/db/chainIndexers/getChainIndexer.ts b/src/shared/db/chainIndexers/getChainIndexer.ts similarity index 94% rename from src/db/chainIndexers/getChainIndexer.ts rename to src/shared/db/chainIndexers/getChainIndexer.ts index 166c2f228..ae7f3e7e8 100644 --- a/src/db/chainIndexers/getChainIndexer.ts +++ b/src/shared/db/chainIndexers/getChainIndexer.ts @@ -1,5 +1,5 @@ import { Prisma } from "@prisma/client"; -import type { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetLastIndexedBlockParams { diff --git a/src/db/chainIndexers/upsertChainIndexer.ts b/src/shared/db/chainIndexers/upsertChainIndexer.ts similarity index 91% rename from src/db/chainIndexers/upsertChainIndexer.ts rename to src/shared/db/chainIndexers/upsertChainIndexer.ts index 123a2a464..744a12a81 100644 --- a/src/db/chainIndexers/upsertChainIndexer.ts +++ b/src/shared/db/chainIndexers/upsertChainIndexer.ts @@ -1,4 +1,4 @@ -import type { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface UpsertChainIndexerParams { diff --git a/src/db/client.ts b/src/shared/db/client.ts similarity index 84% rename from src/db/client.ts rename to src/shared/db/client.ts index bddb0eafe..9c57b1417 100644 --- a/src/db/client.ts +++ b/src/shared/db/client.ts @@ -1,6 +1,6 @@ import { PrismaClient } from "@prisma/client"; -import pg, { Knex } from "knex"; -import { PrismaTransaction } from "../schema/prisma"; +import pg, { type Knex } from "knex"; +import type { PrismaTransaction } from "../schemas/prisma"; import { env } from "../utils/env"; export const prisma = new PrismaClient({ @@ -26,7 +26,7 @@ export const isDatabaseReachable = async () => { try { await prisma.walletDetails.findFirst(); return true; - } catch (error) { + } catch { return false; } }; diff --git a/src/db/configuration/getConfiguration.ts b/src/shared/db/configuration/getConfiguration.ts similarity index 98% rename from src/db/configuration/getConfiguration.ts rename to src/shared/db/configuration/getConfiguration.ts index 67c47f9a6..5d1698ccd 100644 --- a/src/db/configuration/getConfiguration.ts +++ b/src/shared/db/configuration/getConfiguration.ts @@ -7,9 +7,9 @@ import type { AwsWalletConfiguration, GcpWalletConfiguration, ParsedConfig, -} from "../../schema/config"; -import { WalletType } from "../../schema/wallet"; -import { mandatoryAllowedCorsUrls } from "../../server/utils/cors-urls"; +} from "../../schemas/config"; +import { WalletType } from "../../schemas/wallet"; +import { mandatoryAllowedCorsUrls } from "../../../server/utils/cors-urls"; import type { networkResponseSchema } from "../../utils/cache/getSdk"; import { decrypt } from "../../utils/crypto"; import { env } from "../../utils/env"; diff --git a/src/db/configuration/updateConfiguration.ts b/src/shared/db/configuration/updateConfiguration.ts similarity index 100% rename from src/db/configuration/updateConfiguration.ts rename to src/shared/db/configuration/updateConfiguration.ts diff --git a/src/db/contractEventLogs/createContractEventLogs.ts b/src/shared/db/contractEventLogs/createContractEventLogs.ts similarity index 78% rename from src/db/contractEventLogs/createContractEventLogs.ts rename to src/shared/db/contractEventLogs/createContractEventLogs.ts index cb498e9c1..5b4c94e13 100644 --- a/src/db/contractEventLogs/createContractEventLogs.ts +++ b/src/shared/db/contractEventLogs/createContractEventLogs.ts @@ -1,5 +1,5 @@ -import { ContractEventLogs, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schema/prisma"; +import type { ContractEventLogs, Prisma } from "@prisma/client"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/db/contractEventLogs/deleteContractEventLogs.ts b/src/shared/db/contractEventLogs/deleteContractEventLogs.ts similarity index 100% rename from src/db/contractEventLogs/deleteContractEventLogs.ts rename to src/shared/db/contractEventLogs/deleteContractEventLogs.ts diff --git a/src/db/contractEventLogs/getContractEventLogs.ts b/src/shared/db/contractEventLogs/getContractEventLogs.ts similarity index 100% rename from src/db/contractEventLogs/getContractEventLogs.ts rename to src/shared/db/contractEventLogs/getContractEventLogs.ts diff --git a/src/db/contractSubscriptions/createContractSubscription.ts b/src/shared/db/contractSubscriptions/createContractSubscription.ts similarity index 100% rename from src/db/contractSubscriptions/createContractSubscription.ts rename to src/shared/db/contractSubscriptions/createContractSubscription.ts diff --git a/src/db/contractSubscriptions/deleteContractSubscription.ts b/src/shared/db/contractSubscriptions/deleteContractSubscription.ts similarity index 100% rename from src/db/contractSubscriptions/deleteContractSubscription.ts rename to src/shared/db/contractSubscriptions/deleteContractSubscription.ts diff --git a/src/db/contractSubscriptions/getContractSubscriptions.ts b/src/shared/db/contractSubscriptions/getContractSubscriptions.ts similarity index 100% rename from src/db/contractSubscriptions/getContractSubscriptions.ts rename to src/shared/db/contractSubscriptions/getContractSubscriptions.ts diff --git a/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts b/src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts similarity index 91% rename from src/db/contractTransactionReceipts/createContractTransactionReceipts.ts rename to src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts index 1cd733b4c..ac3396516 100644 --- a/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts +++ b/src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts @@ -1,5 +1,5 @@ import { ContractTransactionReceipts, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schema/prisma"; +import { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts b/src/shared/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts similarity index 100% rename from src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts rename to src/shared/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts diff --git a/src/db/contractTransactionReceipts/getContractTransactionReceipts.ts b/src/shared/db/contractTransactionReceipts/getContractTransactionReceipts.ts similarity index 100% rename from src/db/contractTransactionReceipts/getContractTransactionReceipts.ts rename to src/shared/db/contractTransactionReceipts/getContractTransactionReceipts.ts diff --git a/src/db/keypair/delete.ts b/src/shared/db/keypair/delete.ts similarity index 100% rename from src/db/keypair/delete.ts rename to src/shared/db/keypair/delete.ts diff --git a/src/db/keypair/get.ts b/src/shared/db/keypair/get.ts similarity index 100% rename from src/db/keypair/get.ts rename to src/shared/db/keypair/get.ts diff --git a/src/db/keypair/insert.ts b/src/shared/db/keypair/insert.ts similarity index 72% rename from src/db/keypair/insert.ts rename to src/shared/db/keypair/insert.ts index c6d7b737d..77f1ada59 100644 --- a/src/db/keypair/insert.ts +++ b/src/shared/db/keypair/insert.ts @@ -1,6 +1,6 @@ -import { Keypairs } from "@prisma/client"; -import { createHash } from "crypto"; -import { KeypairAlgorithm } from "../../server/schemas/keypairs"; +import type { Keypairs } from "@prisma/client"; +import { createHash } from "node:crypto"; +import type { KeypairAlgorithm } from "../../schemas/keypair"; import { prisma } from "../client"; export const insertKeypair = async ({ diff --git a/src/db/keypair/list.ts b/src/shared/db/keypair/list.ts similarity index 100% rename from src/db/keypair/list.ts rename to src/shared/db/keypair/list.ts diff --git a/src/db/permissions/deletePermissions.ts b/src/shared/db/permissions/deletePermissions.ts similarity index 100% rename from src/db/permissions/deletePermissions.ts rename to src/shared/db/permissions/deletePermissions.ts diff --git a/src/db/permissions/getPermissions.ts b/src/shared/db/permissions/getPermissions.ts similarity index 92% rename from src/db/permissions/getPermissions.ts rename to src/shared/db/permissions/getPermissions.ts index 6d178b5eb..7017ae12e 100644 --- a/src/db/permissions/getPermissions.ts +++ b/src/shared/db/permissions/getPermissions.ts @@ -1,4 +1,4 @@ -import { Permission } from "../../server/schemas/auth"; +import { Permission } from "../../schemas/auth"; import { env } from "../../utils/env"; import { prisma } from "../client"; diff --git a/src/db/permissions/updatePermissions.ts b/src/shared/db/permissions/updatePermissions.ts similarity index 100% rename from src/db/permissions/updatePermissions.ts rename to src/shared/db/permissions/updatePermissions.ts diff --git a/src/db/relayer/getRelayerById.ts b/src/shared/db/relayer/getRelayerById.ts similarity index 100% rename from src/db/relayer/getRelayerById.ts rename to src/shared/db/relayer/getRelayerById.ts diff --git a/src/db/tokens/createToken.ts b/src/shared/db/tokens/createToken.ts similarity index 100% rename from src/db/tokens/createToken.ts rename to src/shared/db/tokens/createToken.ts diff --git a/src/db/tokens/getAccessTokens.ts b/src/shared/db/tokens/getAccessTokens.ts similarity index 100% rename from src/db/tokens/getAccessTokens.ts rename to src/shared/db/tokens/getAccessTokens.ts diff --git a/src/db/tokens/getToken.ts b/src/shared/db/tokens/getToken.ts similarity index 100% rename from src/db/tokens/getToken.ts rename to src/shared/db/tokens/getToken.ts diff --git a/src/db/tokens/revokeToken.ts b/src/shared/db/tokens/revokeToken.ts similarity index 100% rename from src/db/tokens/revokeToken.ts rename to src/shared/db/tokens/revokeToken.ts diff --git a/src/db/tokens/updateToken.ts b/src/shared/db/tokens/updateToken.ts similarity index 100% rename from src/db/tokens/updateToken.ts rename to src/shared/db/tokens/updateToken.ts diff --git a/src/db/transactions/db.ts b/src/shared/db/transactions/db.ts similarity index 100% rename from src/db/transactions/db.ts rename to src/shared/db/transactions/db.ts diff --git a/src/db/transactions/queueTx.ts b/src/shared/db/transactions/queueTx.ts similarity index 95% rename from src/db/transactions/queueTx.ts rename to src/shared/db/transactions/queueTx.ts index 76baa3656..4c12eeae0 100644 --- a/src/db/transactions/queueTx.ts +++ b/src/shared/db/transactions/queueTx.ts @@ -1,11 +1,11 @@ import type { DeployTransaction, Transaction } from "@thirdweb-dev/sdk"; import type { ERC4337EthersSigner } from "@thirdweb-dev/wallets/dist/declarations/src/evm/connectors/smart-wallet/lib/erc4337-signer"; import { ZERO_ADDRESS, type Address } from "thirdweb"; -import type { ContractExtension } from "../../schema/extension"; -import { parseTransactionOverrides } from "../../server/utils/transactionOverrides"; +import type { ContractExtension } from "../../schemas/extension"; import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; import { insertTransaction } from "../../utils/transaction/insertTransaction"; import type { InsertedTransaction } from "../../utils/transaction/types"; +import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; interface QueueTxParams { // we should move away from Transaction type (v4 SDK) diff --git a/src/db/wallets/createWalletDetails.ts b/src/shared/db/wallets/createWalletDetails.ts similarity index 98% rename from src/db/wallets/createWalletDetails.ts rename to src/shared/db/wallets/createWalletDetails.ts index 13f89c41a..2dbb2f242 100644 --- a/src/db/wallets/createWalletDetails.ts +++ b/src/shared/db/wallets/createWalletDetails.ts @@ -1,5 +1,5 @@ import type { Address } from "thirdweb"; -import type { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { encrypt } from "../../utils/crypto"; import { getPrismaWithPostgresTx } from "../client"; diff --git a/src/db/wallets/deleteWalletDetails.ts b/src/shared/db/wallets/deleteWalletDetails.ts similarity index 100% rename from src/db/wallets/deleteWalletDetails.ts rename to src/shared/db/wallets/deleteWalletDetails.ts diff --git a/src/db/wallets/getAllWallets.ts b/src/shared/db/wallets/getAllWallets.ts similarity index 86% rename from src/db/wallets/getAllWallets.ts rename to src/shared/db/wallets/getAllWallets.ts index fd8ef80a0..5f0603e81 100644 --- a/src/db/wallets/getAllWallets.ts +++ b/src/shared/db/wallets/getAllWallets.ts @@ -1,4 +1,4 @@ -import { PrismaTransaction } from "../../schema/prisma"; +import { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetAllWalletsParams { diff --git a/src/db/wallets/getWalletDetails.ts b/src/shared/db/wallets/getWalletDetails.ts similarity index 99% rename from src/db/wallets/getWalletDetails.ts rename to src/shared/db/wallets/getWalletDetails.ts index fcc8db3f5..fcbc8e9d6 100644 --- a/src/db/wallets/getWalletDetails.ts +++ b/src/shared/db/wallets/getWalletDetails.ts @@ -1,6 +1,6 @@ import { getAddress } from "thirdweb"; import { z } from "zod"; -import type { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getConfig } from "../../utils/cache/getConfig"; import { decrypt } from "../../utils/crypto"; import { env } from "../../utils/env"; diff --git a/src/db/wallets/nonceMap.ts b/src/shared/db/wallets/nonceMap.ts similarity index 98% rename from src/db/wallets/nonceMap.ts rename to src/shared/db/wallets/nonceMap.ts index 868b00dcc..aac67c2be 100644 --- a/src/db/wallets/nonceMap.ts +++ b/src/shared/db/wallets/nonceMap.ts @@ -1,4 +1,4 @@ -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { env } from "../../utils/env"; import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; diff --git a/src/db/wallets/updateWalletDetails.ts b/src/shared/db/wallets/updateWalletDetails.ts similarity index 100% rename from src/db/wallets/updateWalletDetails.ts rename to src/shared/db/wallets/updateWalletDetails.ts diff --git a/src/db/wallets/walletNonce.ts b/src/shared/db/wallets/walletNonce.ts similarity index 100% rename from src/db/wallets/walletNonce.ts rename to src/shared/db/wallets/walletNonce.ts diff --git a/src/db/webhooks/createWebhook.ts b/src/shared/db/webhooks/createWebhook.ts similarity index 91% rename from src/db/webhooks/createWebhook.ts rename to src/shared/db/webhooks/createWebhook.ts index 8e8bb66d7..7c32a5f13 100644 --- a/src/db/webhooks/createWebhook.ts +++ b/src/shared/db/webhooks/createWebhook.ts @@ -1,6 +1,6 @@ import { Webhooks } from "@prisma/client"; import { createHash, randomBytes } from "crypto"; -import { WebhooksEventTypes } from "../../schema/webhooks"; +import { WebhooksEventTypes } from "../../schemas/webhooks"; import { prisma } from "../client"; interface CreateWebhooksParams { diff --git a/src/db/webhooks/getAllWebhooks.ts b/src/shared/db/webhooks/getAllWebhooks.ts similarity index 100% rename from src/db/webhooks/getAllWebhooks.ts rename to src/shared/db/webhooks/getAllWebhooks.ts diff --git a/src/db/webhooks/getWebhook.ts b/src/shared/db/webhooks/getWebhook.ts similarity index 100% rename from src/db/webhooks/getWebhook.ts rename to src/shared/db/webhooks/getWebhook.ts diff --git a/src/db/webhooks/revokeWebhook.ts b/src/shared/db/webhooks/revokeWebhook.ts similarity index 100% rename from src/db/webhooks/revokeWebhook.ts rename to src/shared/db/webhooks/revokeWebhook.ts diff --git a/src/lib/cache/swr.ts b/src/shared/lib/cache/swr.ts similarity index 100% rename from src/lib/cache/swr.ts rename to src/shared/lib/cache/swr.ts diff --git a/src/lib/chain/chain-capabilities.ts b/src/shared/lib/chain/chain-capabilities.ts similarity index 100% rename from src/lib/chain/chain-capabilities.ts rename to src/shared/lib/chain/chain-capabilities.ts diff --git a/src/lib/transaction/get-transaction-receipt.ts b/src/shared/lib/transaction/get-transaction-receipt.ts similarity index 100% rename from src/lib/transaction/get-transaction-receipt.ts rename to src/shared/lib/transaction/get-transaction-receipt.ts diff --git a/src/server/schemas/auth/index.ts b/src/shared/schemas/auth.ts similarity index 100% rename from src/server/schemas/auth/index.ts rename to src/shared/schemas/auth.ts diff --git a/src/schema/config.ts b/src/shared/schemas/config.ts similarity index 100% rename from src/schema/config.ts rename to src/shared/schemas/config.ts diff --git a/src/schema/extension.ts b/src/shared/schemas/extension.ts similarity index 100% rename from src/schema/extension.ts rename to src/shared/schemas/extension.ts diff --git a/src/server/schemas/keypairs.ts b/src/shared/schemas/keypair.ts similarity index 93% rename from src/server/schemas/keypairs.ts rename to src/shared/schemas/keypair.ts index 31a3a7bc7..5e0a85bc3 100644 --- a/src/server/schemas/keypairs.ts +++ b/src/shared/schemas/keypair.ts @@ -1,5 +1,5 @@ -import { Keypairs } from "@prisma/client"; -import { Static, Type } from "@sinclair/typebox"; +import type { Keypairs } from "@prisma/client"; +import { type Static, Type } from "@sinclair/typebox"; // https://github.com/auth0/node-jsonwebtoken#algorithms-supported const _supportedAlgorithms = [ diff --git a/src/schema/prisma.ts b/src/shared/schemas/prisma.ts similarity index 100% rename from src/schema/prisma.ts rename to src/shared/schemas/prisma.ts diff --git a/src/constants/relayer.ts b/src/shared/schemas/relayer.ts similarity index 100% rename from src/constants/relayer.ts rename to src/shared/schemas/relayer.ts diff --git a/src/schema/wallet.ts b/src/shared/schemas/wallet.ts similarity index 100% rename from src/schema/wallet.ts rename to src/shared/schemas/wallet.ts diff --git a/src/schema/webhooks.ts b/src/shared/schemas/webhooks.ts similarity index 100% rename from src/schema/webhooks.ts rename to src/shared/schemas/webhooks.ts diff --git a/src/utils/account.ts b/src/shared/utils/account.ts similarity index 93% rename from src/utils/account.ts rename to src/shared/utils/account.ts index 0c8373f7d..ef3d83e68 100644 --- a/src/utils/account.ts +++ b/src/shared/utils/account.ts @@ -6,15 +6,15 @@ import { isSmartBackendWallet, type ParsedWalletDetails, } from "../db/wallets/getWalletDetails"; -import { WalletType } from "../schema/wallet"; -import { splitAwsKmsArn } from "../server/utils/wallets/awsKmsArn"; -import { getConnectedSmartWallet } from "../server/utils/wallets/createSmartWallet"; -import { getAwsKmsAccount } from "../server/utils/wallets/getAwsKmsAccount"; -import { getGcpKmsAccount } from "../server/utils/wallets/getGcpKmsAccount"; +import { WalletType } from "../schemas/wallet"; +import { splitAwsKmsArn } from "../../server/utils/wallets/awsKmsArn"; +import { getConnectedSmartWallet } from "../../server/utils/wallets/createSmartWallet"; +import { getAwsKmsAccount } from "../../server/utils/wallets/getAwsKmsAccount"; +import { getGcpKmsAccount } from "../../server/utils/wallets/getGcpKmsAccount"; import { encryptedJsonToAccount, getLocalWalletAccount, -} from "../server/utils/wallets/getLocalWallet"; +} from "../../server/utils/wallets/getLocalWallet"; import { getSmartWalletV5 } from "./cache/getSmartWalletV5"; import { getChain } from "./chain"; import { thirdwebClient } from "./sdk"; diff --git a/src/utils/auth.ts b/src/shared/utils/auth.ts similarity index 100% rename from src/utils/auth.ts rename to src/shared/utils/auth.ts diff --git a/src/utils/block.ts b/src/shared/utils/block.ts similarity index 100% rename from src/utils/block.ts rename to src/shared/utils/block.ts diff --git a/src/utils/cache/accessToken.ts b/src/shared/utils/cache/accessToken.ts similarity index 100% rename from src/utils/cache/accessToken.ts rename to src/shared/utils/cache/accessToken.ts diff --git a/src/utils/cache/authWallet.ts b/src/shared/utils/cache/authWallet.ts similarity index 100% rename from src/utils/cache/authWallet.ts rename to src/shared/utils/cache/authWallet.ts diff --git a/src/utils/cache/clearCache.ts b/src/shared/utils/cache/clearCache.ts similarity index 100% rename from src/utils/cache/clearCache.ts rename to src/shared/utils/cache/clearCache.ts diff --git a/src/utils/cache/getConfig.ts b/src/shared/utils/cache/getConfig.ts similarity index 86% rename from src/utils/cache/getConfig.ts rename to src/shared/utils/cache/getConfig.ts index 59b9850e9..f18937576 100644 --- a/src/utils/cache/getConfig.ts +++ b/src/shared/utils/cache/getConfig.ts @@ -1,5 +1,5 @@ import { getConfiguration } from "../../db/configuration/getConfiguration"; -import type { ParsedConfig } from "../../schema/config"; +import type { ParsedConfig } from "../../schemas/config"; let _config: ParsedConfig | null = null; diff --git a/src/utils/cache/getContract.ts b/src/shared/utils/cache/getContract.ts similarity index 82% rename from src/utils/cache/getContract.ts rename to src/shared/utils/cache/getContract.ts index 4ace9a679..b9b4dcb51 100644 --- a/src/utils/cache/getContract.ts +++ b/src/shared/utils/cache/getContract.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { StatusCodes } from "http-status-codes"; -import { createCustomError } from "../../server/middleware/error"; -import { abiSchema } from "../../server/schemas/contract"; +import { createCustomError } from "../../../server/middleware/error"; +import { abiSchema } from "../../../server/schemas/contract"; import { getSdk } from "./getSdk"; const abiArraySchema = Type.Array(abiSchema); diff --git a/src/utils/cache/getContractv5.ts b/src/shared/utils/cache/getContractv5.ts similarity index 100% rename from src/utils/cache/getContractv5.ts rename to src/shared/utils/cache/getContractv5.ts diff --git a/src/utils/cache/getSdk.ts b/src/shared/utils/cache/getSdk.ts similarity index 97% rename from src/utils/cache/getSdk.ts rename to src/shared/utils/cache/getSdk.ts index 42c754610..f15781715 100644 --- a/src/utils/cache/getSdk.ts +++ b/src/shared/utils/cache/getSdk.ts @@ -2,7 +2,7 @@ import { Type } from "@sinclair/typebox"; import { ThirdwebSDK } from "@thirdweb-dev/sdk"; import LRUMap from "mnemonist/lru-map"; import { getChainMetadata } from "thirdweb/chains"; -import { badChainError } from "../../server/middleware/error"; +import { badChainError } from "../../../server/middleware/error"; import { getChain } from "../chain"; import { env } from "../env"; import { getWallet } from "./getWallet"; diff --git a/src/utils/cache/getSmartWalletV5.ts b/src/shared/utils/cache/getSmartWalletV5.ts similarity index 100% rename from src/utils/cache/getSmartWalletV5.ts rename to src/shared/utils/cache/getSmartWalletV5.ts diff --git a/src/utils/cache/getWallet.ts b/src/shared/utils/cache/getWallet.ts similarity index 91% rename from src/utils/cache/getWallet.ts rename to src/shared/utils/cache/getWallet.ts index 6b078594b..520cf924f 100644 --- a/src/utils/cache/getWallet.ts +++ b/src/shared/utils/cache/getWallet.ts @@ -7,13 +7,13 @@ import { getWalletDetails, type ParsedWalletDetails, } from "../../db/wallets/getWalletDetails"; -import type { PrismaTransaction } from "../../schema/prisma"; -import { WalletType } from "../../schema/wallet"; -import { createCustomError } from "../../server/middleware/error"; -import { splitAwsKmsArn } from "../../server/utils/wallets/awsKmsArn"; -import { splitGcpKmsResourcePath } from "../../server/utils/wallets/gcpKmsResourcePath"; -import { getLocalWallet } from "../../server/utils/wallets/getLocalWallet"; -import { getSmartWallet } from "../../server/utils/wallets/getSmartWallet"; +import type { PrismaTransaction } from "../../schemas/prisma"; +import { WalletType } from "../../schemas/wallet"; +import { createCustomError } from "../../../server/middleware/error"; +import { splitAwsKmsArn } from "../../../server/utils/wallets/awsKmsArn"; +import { splitGcpKmsResourcePath } from "../../../server/utils/wallets/gcpKmsResourcePath"; +import { getLocalWallet } from "../../../server/utils/wallets/getLocalWallet"; +import { getSmartWallet } from "../../../server/utils/wallets/getSmartWallet"; export const walletsCache = new LRUMap(2048); diff --git a/src/utils/cache/getWebhook.ts b/src/shared/utils/cache/getWebhook.ts similarity index 91% rename from src/utils/cache/getWebhook.ts rename to src/shared/utils/cache/getWebhook.ts index ded5543df..1ed9df187 100644 --- a/src/utils/cache/getWebhook.ts +++ b/src/shared/utils/cache/getWebhook.ts @@ -1,7 +1,7 @@ import type { Webhooks } from "@prisma/client"; import LRUMap from "mnemonist/lru-map"; import { getAllWebhooks } from "../../db/webhooks/getAllWebhooks"; -import type { WebhooksEventTypes } from "../../schema/webhooks"; +import type { WebhooksEventTypes } from "../../schemas/webhooks"; export const webhookCache = new LRUMap(2048); diff --git a/src/utils/cache/keypair.ts b/src/shared/utils/cache/keypair.ts similarity index 100% rename from src/utils/cache/keypair.ts rename to src/shared/utils/cache/keypair.ts diff --git a/src/utils/chain.ts b/src/shared/utils/chain.ts similarity index 100% rename from src/utils/chain.ts rename to src/shared/utils/chain.ts diff --git a/src/utils/cron/clearCacheCron.ts b/src/shared/utils/cron/clearCacheCron.ts similarity index 100% rename from src/utils/cron/clearCacheCron.ts rename to src/shared/utils/cron/clearCacheCron.ts diff --git a/src/utils/cron/isValidCron.ts b/src/shared/utils/cron/isValidCron.ts similarity index 96% rename from src/utils/cron/isValidCron.ts rename to src/shared/utils/cron/isValidCron.ts index f0ea16ccf..abfdc5715 100644 --- a/src/utils/cron/isValidCron.ts +++ b/src/shared/utils/cron/isValidCron.ts @@ -1,6 +1,6 @@ import cronParser from "cron-parser"; import { StatusCodes } from "http-status-codes"; -import { createCustomError } from "../../server/middleware/error"; +import { createCustomError } from "../../../server/middleware/error"; export const isValidCron = (input: string): boolean => { try { diff --git a/src/utils/crypto.ts b/src/shared/utils/crypto.ts similarity index 100% rename from src/utils/crypto.ts rename to src/shared/utils/crypto.ts diff --git a/src/utils/date.ts b/src/shared/utils/date.ts similarity index 100% rename from src/utils/date.ts rename to src/shared/utils/date.ts diff --git a/src/utils/env.ts b/src/shared/utils/env.ts similarity index 100% rename from src/utils/env.ts rename to src/shared/utils/env.ts diff --git a/src/utils/error.ts b/src/shared/utils/error.ts similarity index 100% rename from src/utils/error.ts rename to src/shared/utils/error.ts diff --git a/src/utils/ethers.ts b/src/shared/utils/ethers.ts similarity index 100% rename from src/utils/ethers.ts rename to src/shared/utils/ethers.ts diff --git a/src/utils/indexer/getBlockTime.ts b/src/shared/utils/indexer/getBlockTime.ts similarity index 100% rename from src/utils/indexer/getBlockTime.ts rename to src/shared/utils/indexer/getBlockTime.ts diff --git a/src/utils/logger.ts b/src/shared/utils/logger.ts similarity index 100% rename from src/utils/logger.ts rename to src/shared/utils/logger.ts diff --git a/src/utils/math.ts b/src/shared/utils/math.ts similarity index 100% rename from src/utils/math.ts rename to src/shared/utils/math.ts diff --git a/src/utils/primitiveTypes.ts b/src/shared/utils/primitiveTypes.ts similarity index 100% rename from src/utils/primitiveTypes.ts rename to src/shared/utils/primitiveTypes.ts diff --git a/src/utils/prometheus.ts b/src/shared/utils/prometheus.ts similarity index 98% rename from src/utils/prometheus.ts rename to src/shared/utils/prometheus.ts index abfb9b8e0..dbada9ad4 100644 --- a/src/utils/prometheus.ts +++ b/src/shared/utils/prometheus.ts @@ -1,7 +1,7 @@ import fastify from "fastify"; import { Counter, Gauge, Histogram, Registry } from "prom-client"; import { getUsedBackendWallets, inspectNonce } from "../db/wallets/walletNonce"; -import { getLastUsedOnchainNonce } from "../server/routes/admin/nonces"; +import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; const nonceMetrics = new Gauge({ name: "engine_nonces", diff --git a/src/utils/redis/lock.ts b/src/shared/utils/redis/lock.ts similarity index 100% rename from src/utils/redis/lock.ts rename to src/shared/utils/redis/lock.ts diff --git a/src/utils/redis/redis.ts b/src/shared/utils/redis/redis.ts similarity index 100% rename from src/utils/redis/redis.ts rename to src/shared/utils/redis/redis.ts diff --git a/src/utils/sdk.ts b/src/shared/utils/sdk.ts similarity index 100% rename from src/utils/sdk.ts rename to src/shared/utils/sdk.ts diff --git a/src/utils/transaction/cancelTransaction.ts b/src/shared/utils/transaction/cancelTransaction.ts similarity index 100% rename from src/utils/transaction/cancelTransaction.ts rename to src/shared/utils/transaction/cancelTransaction.ts diff --git a/src/utils/transaction/insertTransaction.ts b/src/shared/utils/transaction/insertTransaction.ts similarity index 95% rename from src/utils/transaction/insertTransaction.ts rename to src/shared/utils/transaction/insertTransaction.ts index fe79018fb..5d4f33da4 100644 --- a/src/utils/transaction/insertTransaction.ts +++ b/src/shared/utils/transaction/insertTransaction.ts @@ -1,14 +1,14 @@ import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; -import { TransactionDB } from "../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { getWalletDetails, isSmartBackendWallet, type ParsedWalletDetails, -} from "../../db/wallets/getWalletDetails"; +} from "../../../shared/db/wallets/getWalletDetails"; import { doesChainSupportService } from "../../lib/chain/chain-capabilities"; -import { createCustomError } from "../../server/middleware/error"; -import { SendTransactionQueue } from "../../worker/queues/sendTransactionQueue"; +import { createCustomError } from "../../../server/middleware/error"; +import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { getChecksumAddress } from "../primitiveTypes"; import { recordMetrics } from "../prometheus"; import { reportUsage } from "../usage"; diff --git a/src/utils/transaction/queueTransation.ts b/src/shared/utils/transaction/queueTransation.ts similarity index 90% rename from src/utils/transaction/queueTransation.ts rename to src/shared/utils/transaction/queueTransation.ts index cdaf2245d..e883a83aa 100644 --- a/src/utils/transaction/queueTransation.ts +++ b/src/shared/utils/transaction/queueTransation.ts @@ -7,9 +7,9 @@ import { type PreparedTransaction, } from "thirdweb"; import { resolvePromisedValue } from "thirdweb/utils"; -import { createCustomError } from "../../server/middleware/error"; -import type { txOverridesWithValueSchema } from "../../server/schemas/txOverrides"; -import { parseTransactionOverrides } from "../../server/utils/transactionOverrides"; +import { createCustomError } from "../../../server/middleware/error"; +import type { txOverridesWithValueSchema } from "../../../server/schemas/txOverrides"; +import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; import { prettifyError } from "../error"; import { insertTransaction } from "./insertTransaction"; import type { InsertedTransaction } from "./types"; diff --git a/src/utils/transaction/simulateQueuedTransaction.ts b/src/shared/utils/transaction/simulateQueuedTransaction.ts similarity index 100% rename from src/utils/transaction/simulateQueuedTransaction.ts rename to src/shared/utils/transaction/simulateQueuedTransaction.ts diff --git a/src/utils/transaction/types.ts b/src/shared/utils/transaction/types.ts similarity index 100% rename from src/utils/transaction/types.ts rename to src/shared/utils/transaction/types.ts diff --git a/src/utils/transaction/webhook.ts b/src/shared/utils/transaction/webhook.ts similarity index 80% rename from src/utils/transaction/webhook.ts rename to src/shared/utils/transaction/webhook.ts index 40cb71ed0..159844a9d 100644 --- a/src/utils/transaction/webhook.ts +++ b/src/shared/utils/transaction/webhook.ts @@ -1,5 +1,5 @@ -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { SendWebhookQueue } from "../../worker/queues/sendWebhookQueue"; +import { WebhooksEventTypes } from "../../schemas/webhooks"; +import { SendWebhookQueue } from "../../../worker/queues/sendWebhookQueue"; import type { AnyTransaction } from "./types"; export const enqueueTransactionWebhook = async ( diff --git a/src/utils/usage.ts b/src/shared/utils/usage.ts similarity index 86% rename from src/utils/usage.ts rename to src/shared/utils/usage.ts index 002c437c8..97de003e3 100644 --- a/src/utils/usage.ts +++ b/src/shared/utils/usage.ts @@ -1,12 +1,12 @@ -import { Static } from "@sinclair/typebox"; -import { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; -import { FastifyInstance } from "fastify"; -import { Address, Hex } from "thirdweb"; -import { ADMIN_QUEUES_BASEPATH } from "../server/middleware/adminRoutes"; -import { OPENAPI_ROUTES } from "../server/middleware/openApi"; -import { contractParamSchema } from "../server/schemas/sharedApiSchemas"; -import { walletWithAddressParamSchema } from "../server/schemas/wallet"; -import { getChainIdFromChain } from "../server/utils/chain"; +import type { Static } from "@sinclair/typebox"; +import type { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; +import type { FastifyInstance } from "fastify"; +import type { Address, Hex } from "thirdweb"; +import { ADMIN_QUEUES_BASEPATH } from "../../server/middleware/adminRoutes"; +import { OPENAPI_ROUTES } from "../../server/middleware/openApi"; +import type { contractParamSchema } from "../../server/schemas/sharedApiSchemas"; +import type { walletWithAddressParamSchema } from "../../server/schemas/wallet"; +import { getChainIdFromChain } from "../../server/utils/chain"; import { env } from "./env"; import { logger } from "./logger"; import { thirdwebClientId } from "./sdk"; diff --git a/src/utils/webhook.ts b/src/shared/utils/webhook.ts similarity index 100% rename from src/utils/webhook.ts rename to src/shared/utils/webhook.ts diff --git a/src/utils/tracer.ts b/src/tracer.ts similarity index 79% rename from src/utils/tracer.ts rename to src/tracer.ts index c07e15c1a..4aae137e3 100644 --- a/src/utils/tracer.ts +++ b/src/tracer.ts @@ -1,5 +1,5 @@ import tracer from "dd-trace"; -import { env } from "./env"; +import { env } from "./shared/utils/env"; if (env.DD_TRACER_ACTIVATED) { tracer.init(); // initialized in a different file to avoid hoisting. diff --git a/src/worker/indexers/chainIndexerRegistry.ts b/src/worker/indexers/chainIndexerRegistry.ts index df37adde8..760b556f1 100644 --- a/src/worker/indexers/chainIndexerRegistry.ts +++ b/src/worker/indexers/chainIndexerRegistry.ts @@ -1,6 +1,6 @@ import cron from "node-cron"; -import { getBlockTimeSeconds } from "../../utils/indexer/getBlockTime"; -import { logger } from "../../utils/logger"; +import { getBlockTimeSeconds } from "../../shared/utils/indexer/getBlockTime"; +import { logger } from "../../shared/utils/logger"; import { handleContractSubscriptions } from "../tasks/chainIndexer"; // @TODO: Move all worker logic to Bullmq to better handle multiple hosts. diff --git a/src/worker/listeners/chainIndexerListener.ts b/src/worker/listeners/chainIndexerListener.ts index e7be532dc..186aee895 100644 --- a/src/worker/listeners/chainIndexerListener.ts +++ b/src/worker/listeners/chainIndexerListener.ts @@ -1,6 +1,6 @@ import cron from "node-cron"; -import { getConfig } from "../../utils/cache/getConfig"; -import { logger } from "../../utils/logger"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { logger } from "../../shared/utils/logger"; import { manageChainIndexers } from "../tasks/manageChainIndexers"; let processChainIndexerStarted = false; diff --git a/src/worker/listeners/configListener.ts b/src/worker/listeners/configListener.ts index 48213c731..62594280d 100644 --- a/src/worker/listeners/configListener.ts +++ b/src/worker/listeners/configListener.ts @@ -1,7 +1,7 @@ -import { knex } from "../../db/client"; -import { getConfig } from "../../utils/cache/getConfig"; -import { clearCacheCron } from "../../utils/cron/clearCacheCron"; -import { logger } from "../../utils/logger"; +import { knex } from "../../shared/db/client"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { clearCacheCron } from "../../shared/utils/cron/clearCacheCron"; +import { logger } from "../../shared/utils/logger"; import { chainIndexerListener } from "./chainIndexerListener"; export const newConfigurationListener = async (): Promise => { diff --git a/src/worker/listeners/webhookListener.ts b/src/worker/listeners/webhookListener.ts index 2ab19ba2f..d1ab64e18 100644 --- a/src/worker/listeners/webhookListener.ts +++ b/src/worker/listeners/webhookListener.ts @@ -1,6 +1,6 @@ -import { knex } from "../../db/client"; -import { webhookCache } from "../../utils/cache/getWebhook"; -import { logger } from "../../utils/logger"; +import { knex } from "../../shared/db/client"; +import { webhookCache } from "../../shared/utils/cache/getWebhook"; +import { logger } from "../../shared/utils/logger"; export const newWebhooksListener = async (): Promise => { logger({ diff --git a/src/worker/queues/cancelRecycledNoncesQueue.ts b/src/worker/queues/cancelRecycledNoncesQueue.ts index ff2991d52..28bc4fde9 100644 --- a/src/worker/queues/cancelRecycledNoncesQueue.ts +++ b/src/worker/queues/cancelRecycledNoncesQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class CancelRecycledNoncesQueue { diff --git a/src/worker/queues/migratePostgresTransactionsQueue.ts b/src/worker/queues/migratePostgresTransactionsQueue.ts index 5e3100080..b24498c6d 100644 --- a/src/worker/queues/migratePostgresTransactionsQueue.ts +++ b/src/worker/queues/migratePostgresTransactionsQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class MigratePostgresTransactionsQueue { diff --git a/src/worker/queues/mineTransactionQueue.ts b/src/worker/queues/mineTransactionQueue.ts index e35627272..f3a0f09ba 100644 --- a/src/worker/queues/mineTransactionQueue.ts +++ b/src/worker/queues/mineTransactionQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type MineTransactionData = { diff --git a/src/worker/queues/nonceHealthCheckQueue.ts b/src/worker/queues/nonceHealthCheckQueue.ts index 31795e7ec..80ddf5453 100644 --- a/src/worker/queues/nonceHealthCheckQueue.ts +++ b/src/worker/queues/nonceHealthCheckQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class NonceHealthCheckQueue { diff --git a/src/worker/queues/nonceResyncQueue.ts b/src/worker/queues/nonceResyncQueue.ts index 23fbf22bc..59ca44b65 100644 --- a/src/worker/queues/nonceResyncQueue.ts +++ b/src/worker/queues/nonceResyncQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class NonceResyncQueue { diff --git a/src/worker/queues/processEventLogsQueue.ts b/src/worker/queues/processEventLogsQueue.ts index 1c32ad36f..de3c97a0d 100644 --- a/src/worker/queues/processEventLogsQueue.ts +++ b/src/worker/queues/processEventLogsQueue.ts @@ -1,8 +1,8 @@ import { Queue } from "bullmq"; import SuperJSON from "superjson"; -import { Address } from "thirdweb"; -import { getConfig } from "../../utils/cache/getConfig"; -import { redis } from "../../utils/redis/redis"; +import type { Address } from "thirdweb"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; // Each job handles a block range for a given chain, filtered by addresses + events. diff --git a/src/worker/queues/processTransactionReceiptsQueue.ts b/src/worker/queues/processTransactionReceiptsQueue.ts index 0f595e73f..6ee7c7557 100644 --- a/src/worker/queues/processTransactionReceiptsQueue.ts +++ b/src/worker/queues/processTransactionReceiptsQueue.ts @@ -1,8 +1,8 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { Address } from "thirdweb"; -import { getConfig } from "../../utils/cache/getConfig"; -import { redis } from "../../utils/redis/redis"; +import type { Address } from "thirdweb"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; // Each job handles a block range for a given chain, filtered by addresses + events. diff --git a/src/worker/queues/pruneTransactionsQueue.ts b/src/worker/queues/pruneTransactionsQueue.ts index 717162f77..5786346cd 100644 --- a/src/worker/queues/pruneTransactionsQueue.ts +++ b/src/worker/queues/pruneTransactionsQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class PruneTransactionsQueue { diff --git a/src/worker/queues/queues.ts b/src/worker/queues/queues.ts index d22534c37..6331d3a8d 100644 --- a/src/worker/queues/queues.ts +++ b/src/worker/queues/queues.ts @@ -1,6 +1,6 @@ import type { Job, JobsOptions, Worker } from "bullmq"; -import { env } from "../../utils/env"; -import { logger } from "../../utils/logger"; +import { env } from "../../shared/utils/env"; +import { logger } from "../../shared/utils/logger"; export const defaultJobOptions: JobsOptions = { // Does not retry by default. Queues must explicitly define their own retry count and backoff behavior. diff --git a/src/worker/queues/sendTransactionQueue.ts b/src/worker/queues/sendTransactionQueue.ts index ba93068b8..4f4db261b 100644 --- a/src/worker/queues/sendTransactionQueue.ts +++ b/src/worker/queues/sendTransactionQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type SendTransactionData = { diff --git a/src/worker/queues/sendWebhookQueue.ts b/src/worker/queues/sendWebhookQueue.ts index 1861e4375..a39bb7468 100644 --- a/src/worker/queues/sendWebhookQueue.ts +++ b/src/worker/queues/sendWebhookQueue.ts @@ -8,10 +8,10 @@ import SuperJSON from "superjson"; import { WebhooksEventTypes, type BackendWalletBalanceWebhookParams, -} from "../../schema/webhooks"; -import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; +} from "../../shared/schemas/webhooks"; +import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type EnqueueContractSubscriptionWebhookData = { diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancelRecycledNoncesWorker.ts index 6b8b6a125..2fa58212a 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancelRecycledNoncesWorker.ts @@ -1,10 +1,10 @@ -import { Job, Processor, Worker } from "bullmq"; -import { Address } from "thirdweb"; -import { recycleNonce } from "../../db/wallets/walletNonce"; -import { isNonceAlreadyUsedError } from "../../utils/error"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; -import { sendCancellationTransaction } from "../../utils/transaction/cancelTransaction"; +import { type Job, type Processor, Worker } from "bullmq"; +import type { Address } from "thirdweb"; +import { recycleNonce } from "../../shared/db/wallets/walletNonce"; +import { isNonceAlreadyUsedError } from "../../shared/utils/error"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; +import { sendCancellationTransaction } from "../../shared/utils/transaction/cancelTransaction"; import { CancelRecycledNoncesQueue } from "../queues/cancelRecycledNoncesQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chainIndexer.ts index a7fbcc304..41bf92288 100644 --- a/src/worker/tasks/chainIndexer.ts +++ b/src/worker/tasks/chainIndexer.ts @@ -4,13 +4,13 @@ import { getRpcClient, type Address, } from "thirdweb"; -import { getBlockForIndexing } from "../../db/chainIndexers/getChainIndexer"; -import { upsertChainIndexer } from "../../db/chainIndexers/upsertChainIndexer"; -import { prisma } from "../../db/client"; -import { getContractSubscriptionsByChainId } from "../../db/contractSubscriptions/getContractSubscriptions"; -import { getChain } from "../../utils/chain"; -import { logger } from "../../utils/logger"; -import { thirdwebClient } from "../../utils/sdk"; +import { getBlockForIndexing } from "../../shared/db/chainIndexers/getChainIndexer"; +import { upsertChainIndexer } from "../../shared/db/chainIndexers/upsertChainIndexer"; +import { prisma } from "../../shared/db/client"; +import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getChain } from "../../shared/utils/chain"; +import { logger } from "../../shared/utils/logger"; +import { thirdwebClient } from "../../shared/utils/sdk"; import { ProcessEventsLogQueue } from "../queues/processEventLogsQueue"; import { ProcessTransactionReceiptsQueue } from "../queues/processTransactionReceiptsQueue"; diff --git a/src/worker/tasks/manageChainIndexers.ts b/src/worker/tasks/manageChainIndexers.ts index 741562ee7..787f88116 100644 --- a/src/worker/tasks/manageChainIndexers.ts +++ b/src/worker/tasks/manageChainIndexers.ts @@ -1,4 +1,4 @@ -import { getContractSubscriptionsUniqueChainIds } from "../../db/contractSubscriptions/getContractSubscriptions"; +import { getContractSubscriptionsUniqueChainIds } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; import { INDEXER_REGISTRY, addChainIndexer, diff --git a/src/worker/tasks/migratePostgresTransactionsWorker.ts b/src/worker/tasks/migratePostgresTransactionsWorker.ts index 7547d9b75..fb3b3c4e2 100644 --- a/src/worker/tasks/migratePostgresTransactionsWorker.ts +++ b/src/worker/tasks/migratePostgresTransactionsWorker.ts @@ -2,17 +2,20 @@ import type { Transactions } from "@prisma/client"; import { Worker, type Job, type Processor } from "bullmq"; import assert from "node:assert"; import type { Hex } from "thirdweb"; -import { getPrismaWithPostgresTx, prisma } from "../../db/client"; -import { TransactionDB } from "../../db/transactions/db"; -import type { PrismaTransaction } from "../../schema/prisma"; -import { getConfig } from "../../utils/cache/getConfig"; -import { logger } from "../../utils/logger"; -import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; -import { redis } from "../../utils/redis/redis"; +import { getPrismaWithPostgresTx, prisma } from "../../shared/db/client"; +import { TransactionDB } from "../../shared/db/transactions/db"; +import type { PrismaTransaction } from "../../shared/schemas/prisma"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { logger } from "../../shared/utils/logger"; +import { + maybeBigInt, + normalizeAddress, +} from "../../shared/utils/primitiveTypes"; +import { redis } from "../../shared/utils/redis/redis"; import type { QueuedTransaction, SentTransaction, -} from "../../utils/transaction/types"; +} from "../../shared/utils/transaction/types"; import { MigratePostgresTransactionsQueue } from "../queues/migratePostgresTransactionsQueue"; import { MineTransactionQueue } from "../queues/mineTransactionQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index 1d3ce45f9..b8facc1fa 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -10,31 +10,34 @@ import { } from "thirdweb"; import { stringify } from "thirdweb/utils"; import { getUserOpReceipt } from "thirdweb/wallets/smart"; -import { TransactionDB } from "../../db/transactions/db"; -import { recycleNonce, removeSentNonce } from "../../db/wallets/walletNonce"; +import { TransactionDB } from "../../shared/db/transactions/db"; +import { + recycleNonce, + removeSentNonce, +} from "../../shared/db/wallets/walletNonce"; import { getReceiptForEOATransaction, getReceiptForUserOp, -} from "../../lib/transaction/get-transaction-receipt"; -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { getBlockNumberish } from "../../utils/block"; -import { getConfig } from "../../utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; -import { getChain } from "../../utils/chain"; -import { msSince } from "../../utils/date"; -import { env } from "../../utils/env"; -import { prettifyError } from "../../utils/error"; -import { logger } from "../../utils/logger"; -import { recordMetrics } from "../../utils/prometheus"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +} from "../../shared/lib/transaction/get-transaction-receipt"; +import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; +import { getBlockNumberish } from "../../shared/utils/block"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { getChain } from "../../shared/utils/chain"; +import { msSince } from "../../shared/utils/date"; +import { env } from "../../shared/utils/env"; +import { prettifyError } from "../../shared/utils/error"; +import { logger } from "../../shared/utils/logger"; +import { recordMetrics } from "../../shared/utils/prometheus"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import type { ErroredTransaction, MinedTransaction, SentTransaction, -} from "../../utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../utils/transaction/webhook"; -import { reportUsage } from "../../utils/usage"; +} from "../../shared/utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../shared/utils/transaction/webhook"; +import { reportUsage } from "../../shared/utils/usage"; import { MineTransactionQueue, type MineTransactionData, diff --git a/src/worker/tasks/nonceHealthCheckWorker.ts b/src/worker/tasks/nonceHealthCheckWorker.ts index 4d528c0c8..2c2ab63a3 100644 --- a/src/worker/tasks/nonceHealthCheckWorker.ts +++ b/src/worker/tasks/nonceHealthCheckWorker.ts @@ -3,10 +3,10 @@ import { getAddress, type Address } from "thirdweb"; import { getUsedBackendWallets, inspectNonce, -} from "../../db/wallets/walletNonce"; +} from "../../shared/db/wallets/walletNonce"; import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; import { NonceHealthCheckQueue } from "../queues/nonceHealthCheckQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonceResyncWorker.ts index 8f5cb0c65..144390076 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -5,13 +5,13 @@ import { isSentNonce, recycleNonce, splitSentNoncesKey, -} from "../../db/wallets/walletNonce"; -import { getConfig } from "../../utils/cache/getConfig"; -import { getChain } from "../../utils/chain"; -import { prettifyError } from "../../utils/error"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +} from "../../shared/db/wallets/walletNonce"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getChain } from "../../shared/utils/chain"; +import { prettifyError } from "../../shared/utils/error"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import { NonceResyncQueue } from "../queues/nonceResyncQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index b3ad7c5fa..b1fd0c357 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -15,16 +15,16 @@ import { type ThirdwebContract, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import { bulkInsertContractEventLogs } from "../../db/contractEventLogs/createContractEventLogs"; -import { getContractSubscriptionsByChainId } from "../../db/contractSubscriptions/getContractSubscriptions"; -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { getChain } from "../../utils/chain"; -import { logger } from "../../utils/logger"; -import { normalizeAddress } from "../../utils/primitiveTypes"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +import { bulkInsertContractEventLogs } from "../../shared/db/contractEventLogs/createContractEventLogs"; +import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; +import { getChain } from "../../shared/utils/chain"; +import { logger } from "../../shared/utils/logger"; +import { normalizeAddress } from "../../shared/utils/primitiveTypes"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import { - EnqueueProcessEventLogsData, + type EnqueueProcessEventLogsData, ProcessEventsLogQueue, } from "../queues/processEventLogsQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index d8cdb23ae..5bfb4e5a0 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -12,20 +12,19 @@ import { } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { decodeFunctionData, type Abi, type Hash } from "viem"; -import { bulkInsertContractTransactionReceipts } from "../../db/contractTransactionReceipts/createContractTransactionReceipts"; -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { getChain } from "../../utils/chain"; -import { logger } from "../../utils/logger"; -import { normalizeAddress } from "../../utils/primitiveTypes"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +import { bulkInsertContractTransactionReceipts } from "../../shared/db/contractTransactionReceipts/createContractTransactionReceipts"; +import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; +import { getChain } from "../../shared/utils/chain"; +import { logger } from "../../shared/utils/logger"; +import { normalizeAddress } from "../../shared/utils/primitiveTypes"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import { ProcessTransactionReceiptsQueue, type EnqueueProcessTransactionReceiptsData, } from "../queues/processTransactionReceiptsQueue"; import { logWorkerExceptions } from "../queues/queues"; import { SendWebhookQueue } from "../queues/sendWebhookQueue"; -import { getContractId } from "../utils/contractId"; import { getWebhooksByContractAddresses } from "./processEventLogsWorker"; const handler: Processor = async (job: Job) => { @@ -228,3 +227,6 @@ export const initProcessTransactionReceiptsWorker = () => { }); logWorkerExceptions(_worker); }; + +const getContractId = (chainId: number, contractAddress: string) => + `${chainId}:${contractAddress}`; diff --git a/src/worker/tasks/pruneTransactionsWorker.ts b/src/worker/tasks/pruneTransactionsWorker.ts index 9ba8a361a..d736c23f3 100644 --- a/src/worker/tasks/pruneTransactionsWorker.ts +++ b/src/worker/tasks/pruneTransactionsWorker.ts @@ -1,8 +1,8 @@ import { Worker, type Job, type Processor } from "bullmq"; -import { TransactionDB } from "../../db/transactions/db"; -import { pruneNonceMaps } from "../../db/wallets/nonceMap"; -import { env } from "../../utils/env"; -import { redis } from "../../utils/redis/redis"; +import { TransactionDB } from "../../shared/db/transactions/db"; +import { pruneNonceMaps } from "../../shared/db/wallets/nonceMap"; +import { env } from "../../shared/utils/env"; +import { redis } from "../../shared/utils/redis/redis"; import { PruneTransactionsQueue } from "../queues/pruneTransactionsQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 783530ba0..65c810733 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -18,39 +18,39 @@ import { type UserOperation, } from "thirdweb/wallets/smart"; import { getContractAddress } from "viem"; -import { TransactionDB } from "../../db/transactions/db"; +import { TransactionDB } from "../../shared/db/transactions/db"; import { acquireNonce, addSentNonce, recycleNonce, syncLatestNonceFromOnchainIfHigher, -} from "../../db/wallets/walletNonce"; +} from "../../shared/db/wallets/walletNonce"; import { getAccount, getSmartBackendWalletAdminAccount, -} from "../../utils/account"; -import { getBlockNumberish } from "../../utils/block"; -import { getChain } from "../../utils/chain"; -import { msSince } from "../../utils/date"; -import { env } from "../../utils/env"; +} from "../../shared/utils/account"; +import { getBlockNumberish } from "../../shared/utils/block"; +import { getChain } from "../../shared/utils/chain"; +import { msSince } from "../../shared/utils/date"; +import { env } from "../../shared/utils/env"; import { isInsufficientFundsError, isNonceAlreadyUsedError, isReplacementGasFeeTooLow, wrapError, -} from "../../utils/error"; -import { getChecksumAddress } from "../../utils/primitiveTypes"; -import { recordMetrics } from "../../utils/prometheus"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +} from "../../shared/utils/error"; +import { getChecksumAddress } from "../../shared/utils/primitiveTypes"; +import { recordMetrics } from "../../shared/utils/prometheus"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import type { ErroredTransaction, PopulatedTransaction, QueuedTransaction, SentTransaction, -} from "../../utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../utils/transaction/webhook"; -import { reportUsage } from "../../utils/usage"; +} from "../../shared/utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../shared/utils/transaction/webhook"; +import { reportUsage } from "../../shared/utils/usage"; import { MineTransactionQueue } from "../queues/mineTransactionQueue"; import { logWorkerExceptions } from "../queues/queues"; import { diff --git a/src/worker/tasks/sendWebhookWorker.ts b/src/worker/tasks/sendWebhookWorker.ts index a8cf60c23..bd62edc40 100644 --- a/src/worker/tasks/sendWebhookWorker.ts +++ b/src/worker/tasks/sendWebhookWorker.ts @@ -1,20 +1,23 @@ import type { Static } from "@sinclair/typebox"; import { Worker, type Job, type Processor } from "bullmq"; import superjson from "superjson"; -import { TransactionDB } from "../../db/transactions/db"; +import { TransactionDB } from "../../shared/db/transactions/db"; import { WebhooksEventTypes, type BackendWalletBalanceWebhookParams, -} from "../../schema/webhooks"; +} from "../../shared/schemas/webhooks"; import { toEventLogSchema } from "../../server/schemas/eventLog"; import { toTransactionSchema, type TransactionSchema, } from "../../server/schemas/transaction"; import { toTransactionReceiptSchema } from "../../server/schemas/transactionReceipt"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; -import { sendWebhookRequest, type WebhookResponse } from "../../utils/webhook"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; +import { + sendWebhookRequest, + type WebhookResponse, +} from "../../shared/utils/webhook"; import { SendWebhookQueue, type WebhookJob } from "../queues/sendWebhookQueue"; const handler: Processor = async (job: Job) => { diff --git a/src/worker/utils/contractId.ts b/src/worker/utils/contractId.ts deleted file mode 100644 index 6cf991fca..000000000 --- a/src/worker/utils/contractId.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const getContractId = (chainId: number, contractAddress: string) => - `${chainId}:${contractAddress}`; diff --git a/src/worker/utils/nonce.ts b/src/worker/utils/nonce.ts deleted file mode 100644 index d225ae87b..000000000 --- a/src/worker/utils/nonce.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { BigNumber } from "ethers"; -import { concat, toHex } from "viem"; - -const generateRandomUint192 = (): bigint => { - const rand1 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand2 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand3 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand4 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand5 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand6 = BigInt(Math.floor(Math.random() * 0x100000000)); - return ( - (rand1 << 160n) | - (rand2 << 128n) | - (rand3 << 96n) | - (rand4 << 64n) | - (rand5 << 32n) | - rand6 - ); -}; - -export const randomNonce = () => { - return BigNumber.from( - concat([toHex(generateRandomUint192()), "0x0000000000000000"]), - ); -}; diff --git a/test/e2e/.env.test.example b/tests/e2e/.env.test.example similarity index 100% rename from test/e2e/.env.test.example rename to tests/e2e/.env.test.example diff --git a/test/e2e/.gitignore b/tests/e2e/.gitignore similarity index 100% rename from test/e2e/.gitignore rename to tests/e2e/.gitignore diff --git a/test/e2e/README.md b/tests/e2e/README.md similarity index 100% rename from test/e2e/README.md rename to tests/e2e/README.md diff --git a/test/e2e/bun.lockb b/tests/e2e/bun.lockb similarity index 100% rename from test/e2e/bun.lockb rename to tests/e2e/bun.lockb diff --git a/test/e2e/config.ts b/tests/e2e/config.ts similarity index 100% rename from test/e2e/config.ts rename to tests/e2e/config.ts diff --git a/test/e2e/package.json b/tests/e2e/package.json similarity index 100% rename from test/e2e/package.json rename to tests/e2e/package.json diff --git a/test/e2e/scripts/counter.ts b/tests/e2e/scripts/counter.ts similarity index 90% rename from test/e2e/scripts/counter.ts rename to tests/e2e/scripts/counter.ts index ccb9bd8de..b0c40f50e 100644 --- a/test/e2e/scripts/counter.ts +++ b/tests/e2e/scripts/counter.ts @@ -2,8 +2,8 @@ // You can save the output to a file and then use this script to count the number of times a specific RPC call is made. import { argv } from "bun"; -import { readFile } from "fs/promises"; -import { join } from "path"; +import { readFile } from "node:fs/promises"; +import { join } from "node:path"; const file = join(__dirname, argv[2]); diff --git a/test/e2e/tests/extensions.test.ts b/tests/e2e/tests/extensions.test.ts similarity index 98% rename from test/e2e/tests/extensions.test.ts rename to tests/e2e/tests/extensions.test.ts index 1126f2877..ed0674da8 100644 --- a/test/e2e/tests/extensions.test.ts +++ b/tests/e2e/tests/extensions.test.ts @@ -1,4 +1,4 @@ -import assert from "assert"; +import assert from "node:assert"; import { sleep } from "bun"; import { beforeAll, describe, expect, test } from "bun:test"; import { getAddress, type Address } from "viem"; diff --git a/test/e2e/tests/load.test.ts b/tests/e2e/tests/load.test.ts similarity index 98% rename from test/e2e/tests/load.test.ts rename to tests/e2e/tests/load.test.ts index 1e31a2e4b..0cdea6317 100644 --- a/test/e2e/tests/load.test.ts +++ b/tests/e2e/tests/load.test.ts @@ -1,4 +1,4 @@ -import assert from "assert"; +import assert from "node:assert"; import { sleep } from "bun"; import { describe, expect, test } from "bun:test"; import { getAddress } from "viem"; diff --git a/test/e2e/tests/read.test.ts b/tests/e2e/tests/read.test.ts similarity index 99% rename from test/e2e/tests/read.test.ts rename to tests/e2e/tests/read.test.ts index 7be048956..25acbc951 100644 --- a/test/e2e/tests/read.test.ts +++ b/tests/e2e/tests/read.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import { sepolia } from "thirdweb/chains"; -import type { ApiError } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; +import type { ApiError } from "../../../sdk/dist/thirdweb-dev-engine.cjs.js"; import type { setupEngine } from "../utils/engine"; import { setup } from "./setup"; diff --git a/test/e2e/tests/routes/erc1155-transfer.test.ts b/tests/e2e/tests/routes/erc1155-transfer.test.ts similarity index 100% rename from test/e2e/tests/routes/erc1155-transfer.test.ts rename to tests/e2e/tests/routes/erc1155-transfer.test.ts diff --git a/test/e2e/tests/routes/erc20-transfer.test.ts b/tests/e2e/tests/routes/erc20-transfer.test.ts similarity index 99% rename from test/e2e/tests/routes/erc20-transfer.test.ts rename to tests/e2e/tests/routes/erc20-transfer.test.ts index 7a22c149e..867e1d43b 100644 --- a/test/e2e/tests/routes/erc20-transfer.test.ts +++ b/tests/e2e/tests/routes/erc20-transfer.test.ts @@ -4,7 +4,7 @@ import { ZERO_ADDRESS, toWei, type Address } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; -import { setup } from "./../setup"; +import { setup } from "../setup"; describe("ERC20 transfer", () => { let tokenContractAddress: string; diff --git a/test/e2e/tests/routes/erc721-transfer.test.ts b/tests/e2e/tests/routes/erc721-transfer.test.ts similarity index 100% rename from test/e2e/tests/routes/erc721-transfer.test.ts rename to tests/e2e/tests/routes/erc721-transfer.test.ts diff --git a/test/e2e/tests/routes/signMessage.test.ts b/tests/e2e/tests/routes/signMessage.test.ts similarity index 100% rename from test/e2e/tests/routes/signMessage.test.ts rename to tests/e2e/tests/routes/signMessage.test.ts diff --git a/test/e2e/tests/routes/signaturePrepare.test.ts b/tests/e2e/tests/routes/signaturePrepare.test.ts similarity index 100% rename from test/e2e/tests/routes/signaturePrepare.test.ts rename to tests/e2e/tests/routes/signaturePrepare.test.ts diff --git a/test/e2e/tests/routes/write.test.ts b/tests/e2e/tests/routes/write.test.ts similarity index 97% rename from test/e2e/tests/routes/write.test.ts rename to tests/e2e/tests/routes/write.test.ts index d891055d6..68e9db9de 100644 --- a/test/e2e/tests/routes/write.test.ts +++ b/tests/e2e/tests/routes/write.test.ts @@ -3,10 +3,10 @@ import assert from "node:assert"; import { stringToHex, type Address } from "thirdweb"; import { zeroAddress } from "viem"; import type { ApiError } from "../../../../sdk/dist/thirdweb-dev-engine.cjs.js"; -import { CONFIG } from "../../config"; -import type { setupEngine } from "../../utils/engine"; -import { pollTransactionStatus } from "../../utils/transactions"; -import { setup } from "../setup"; +import { CONFIG } from "../../config.js"; +import type { setupEngine } from "../../utils/engine.js"; +import { pollTransactionStatus } from "../../utils/transactions.js"; +import { setup } from "../setup.js"; describe("/contract/write route", () => { let tokenContractAddress: string; diff --git a/test/e2e/tests/setup.ts b/tests/e2e/tests/setup.ts similarity index 96% rename from test/e2e/tests/setup.ts rename to tests/e2e/tests/setup.ts index c65b07e06..0be24b7f7 100644 --- a/test/e2e/tests/setup.ts +++ b/tests/e2e/tests/setup.ts @@ -25,7 +25,7 @@ export const setup = async (): Promise => { const engine = setupEngine(); const backendWallet = await getEngineBackendWallet(engine); - await engine.backendWallet.resetNonces(); + await engine.backendWallet.resetNonces({}); if (!env.THIRDWEB_API_SECRET_KEY) throw new Error("THIRDWEB_API_SECRET_KEY is not set"); diff --git a/test/e2e/tests/sign-transaction.test.ts b/tests/e2e/tests/sign-transaction.test.ts similarity index 100% rename from test/e2e/tests/sign-transaction.test.ts rename to tests/e2e/tests/sign-transaction.test.ts diff --git a/test/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts b/tests/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts similarity index 100% rename from test/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts rename to tests/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts diff --git a/test/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts b/tests/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts similarity index 100% rename from test/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts rename to tests/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts diff --git a/test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts b/tests/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts similarity index 100% rename from test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts rename to tests/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts diff --git a/test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts b/tests/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts similarity index 100% rename from test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts rename to tests/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts diff --git a/test/e2e/tests/smoke.test.ts b/tests/e2e/tests/smoke.test.ts similarity index 100% rename from test/e2e/tests/smoke.test.ts rename to tests/e2e/tests/smoke.test.ts diff --git a/test/e2e/tests/userop.test.ts b/tests/e2e/tests/userop.test.ts similarity index 98% rename from test/e2e/tests/userop.test.ts rename to tests/e2e/tests/userop.test.ts index 18c5cba6d..875231e67 100644 --- a/test/e2e/tests/userop.test.ts +++ b/tests/e2e/tests/userop.test.ts @@ -1,5 +1,5 @@ import { beforeAll, describe, expect, test } from "bun:test"; -import { randomBytes } from "crypto"; +import { randomBytes } from "node:crypto"; import { getAddress, type Address } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { DEFAULT_ACCOUNT_FACTORY_V0_6 } from "thirdweb/wallets/smart"; diff --git a/test/e2e/tests/utils/getBlockTime.test.ts b/tests/e2e/tests/utils/getBlockTime.test.ts similarity index 100% rename from test/e2e/tests/utils/getBlockTime.test.ts rename to tests/e2e/tests/utils/getBlockTime.test.ts diff --git a/test/e2e/tsconfig.json b/tests/e2e/tsconfig.json similarity index 100% rename from test/e2e/tsconfig.json rename to tests/e2e/tsconfig.json diff --git a/test/e2e/utils/anvil.ts b/tests/e2e/utils/anvil.ts similarity index 100% rename from test/e2e/utils/anvil.ts rename to tests/e2e/utils/anvil.ts diff --git a/test/e2e/utils/engine.ts b/tests/e2e/utils/engine.ts similarity index 95% rename from test/e2e/utils/engine.ts rename to tests/e2e/utils/engine.ts index 53cb57be0..b4bdede4f 100644 --- a/test/e2e/utils/engine.ts +++ b/tests/e2e/utils/engine.ts @@ -1,5 +1,5 @@ import { checksumAddress } from "thirdweb/utils"; -import { Engine } from "../../../sdk"; +import { Engine } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; import { CONFIG } from "../config"; import { ANVIL_PKEY_A, ANVIL_PKEY_B } from "./wallets"; diff --git a/test/e2e/utils/statistics.ts b/tests/e2e/utils/statistics.ts similarity index 100% rename from test/e2e/utils/statistics.ts rename to tests/e2e/utils/statistics.ts diff --git a/test/e2e/utils/transactions.ts b/tests/e2e/utils/transactions.ts similarity index 95% rename from test/e2e/utils/transactions.ts rename to tests/e2e/utils/transactions.ts index 7e51b5a6c..4f889d3a9 100644 --- a/test/e2e/utils/transactions.ts +++ b/tests/e2e/utils/transactions.ts @@ -1,6 +1,6 @@ import { sleep } from "bun"; -import { type Address } from "viem"; -import { Engine } from "../../../sdk"; +import type { Address } from "viem"; +import type { Engine } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; import { CONFIG } from "../config"; type Timing = { diff --git a/test/e2e/utils/wallets.ts b/tests/e2e/utils/wallets.ts similarity index 100% rename from test/e2e/utils/wallets.ts rename to tests/e2e/utils/wallets.ts diff --git a/src/tests/config/aws-kms.ts b/tests/shared/aws-kms.ts similarity index 100% rename from src/tests/config/aws-kms.ts rename to tests/shared/aws-kms.ts diff --git a/src/tests/shared/chain.ts b/tests/shared/chain.ts similarity index 100% rename from src/tests/shared/chain.ts rename to tests/shared/chain.ts diff --git a/src/tests/shared/client.ts b/tests/shared/client.ts similarity index 100% rename from src/tests/shared/client.ts rename to tests/shared/client.ts diff --git a/src/tests/config/gcp-kms.ts b/tests/shared/gcp-kms.ts similarity index 100% rename from src/tests/config/gcp-kms.ts rename to tests/shared/gcp-kms.ts diff --git a/src/tests/shared/typed-data.ts b/tests/shared/typed-data.ts similarity index 100% rename from src/tests/shared/typed-data.ts rename to tests/shared/typed-data.ts diff --git a/src/tests/auth.test.ts b/tests/unit/auth.test.ts similarity index 96% rename from src/tests/auth.test.ts rename to tests/unit/auth.test.ts index 8e6e774e9..7ea7ab5f2 100644 --- a/src/tests/auth.test.ts +++ b/tests/unit/auth.test.ts @@ -1,19 +1,22 @@ import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { LocalWallet } from "@thirdweb-dev/wallets"; -import { FastifyRequest } from "fastify/types/request"; +import type { FastifyRequest } from "fastify/types/request"; import jsonwebtoken from "jsonwebtoken"; -import { getPermissions } from "../db/permissions/getPermissions"; -import { WebhooksEventTypes } from "../schema/webhooks"; -import { onRequest } from "../server/middleware/auth"; -import { Permission } from "../server/schemas/auth"; -import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../utils/auth"; -import { getAccessToken } from "../utils/cache/accessToken"; -import { getAuthWallet } from "../utils/cache/authWallet"; -import { getConfig } from "../utils/cache/getConfig"; -import { getWebhooksByEventType } from "../utils/cache/getWebhook"; -import { getKeypair } from "../utils/cache/keypair"; -import { sendWebhookRequest } from "../utils/webhook"; +import { getPermissions } from "../../src/shared/db/permissions/getPermissions"; +import { WebhooksEventTypes } from "../../src/shared/schemas/webhooks"; +import { onRequest } from "../../src/server/middleware/auth"; +import { + THIRDWEB_DASHBOARD_ISSUER, + handleSiwe, +} from "../../src/shared/utils/auth"; +import { getAccessToken } from "../../src/shared/utils/cache/accessToken"; +import { getAuthWallet } from "../../src/shared/utils/cache/authWallet"; +import { getConfig } from "../../src/shared/utils/cache/getConfig"; +import { getWebhooksByEventType } from "../../src/shared/utils/cache/getWebhook"; +import { getKeypair } from "../../src/shared/utils/cache/keypair"; +import { sendWebhookRequest } from "../../src/shared/utils/webhook"; +import { Permission } from "../../src/shared/schemas"; vi.mock("../utils/cache/accessToken"); const mockGetAccessToken = vi.mocked(getAccessToken); diff --git a/src/tests/aws-arn.test.ts b/tests/unit/aws-arn.test.ts similarity index 97% rename from src/tests/aws-arn.test.ts rename to tests/unit/aws-arn.test.ts index cc885a4a9..8b46025f3 100644 --- a/src/tests/aws-arn.test.ts +++ b/tests/unit/aws-arn.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { getAwsKmsArn, splitAwsKmsArn, -} from "../server/utils/wallets/awsKmsArn"; +} from "../../src/server/utils/wallets/awsKmsArn"; describe("splitAwsKmsArn", () => { it("should correctly split a valid AWS KMS ARN", () => { diff --git a/src/tests/wallets/aws-kms.test.ts b/tests/unit/aws-kms.test.ts similarity index 95% rename from src/tests/wallets/aws-kms.test.ts rename to tests/unit/aws-kms.test.ts index 4d0b7a129..b02c4e28a 100644 --- a/src/tests/wallets/aws-kms.test.ts +++ b/tests/unit/aws-kms.test.ts @@ -1,11 +1,7 @@ import { beforeAll, expect, test, vi } from "vitest"; import { ANVIL_CHAIN, anvilTestClient } from "../shared/chain.ts"; - -import { TEST_AWS_KMS_CONFIG } from "../config/aws-kms.ts"; - import { typedData } from "../shared/typed-data.ts"; - import { verifyTypedData } from "thirdweb"; import { verifyEOASignature } from "thirdweb/auth"; import { @@ -14,8 +10,9 @@ import { } from "thirdweb/transaction"; import { toUnits, toWei } from "thirdweb/utils"; import { getWalletBalance } from "thirdweb/wallets"; -import { getAwsKmsAccount } from "../../server/utils/wallets/getAwsKmsAccount.js"; import { TEST_CLIENT } from "../shared/client.ts"; +import { getAwsKmsAccount } from "../../src/server/utils/wallets/getAwsKmsAccount"; +import { TEST_AWS_KMS_CONFIG } from "../shared/aws-kms.ts"; let account: Awaited>; diff --git a/src/tests/chain.test.ts b/tests/unit/chain.test.ts similarity index 96% rename from src/tests/chain.test.ts rename to tests/unit/chain.test.ts index 4a3684a6c..dff36db94 100644 --- a/src/tests/chain.test.ts +++ b/tests/unit/chain.test.ts @@ -3,8 +3,8 @@ import { getChainBySlugAsync, } from "@thirdweb-dev/chains"; import { beforeEach, describe, expect, it, vi } from "vitest"; -import { getChainIdFromChain } from "../server/utils/chain"; -import { getConfig } from "../utils/cache/getConfig"; +import { getChainIdFromChain } from "../../src/server/utils/chain"; +import { getConfig } from "../../src/shared/utils/cache/getConfig"; // Mock the external dependencies vi.mock("../utils/cache/getConfig"); diff --git a/src/tests/wallets/gcp-kms.test.ts b/tests/unit/gcp-kms.test.ts similarity index 94% rename from src/tests/wallets/gcp-kms.test.ts rename to tests/unit/gcp-kms.test.ts index afc4feffb..1f2d183cc 100644 --- a/src/tests/wallets/gcp-kms.test.ts +++ b/tests/unit/gcp-kms.test.ts @@ -1,9 +1,7 @@ import { beforeAll, expect, test, vi } from "vitest"; import { ANVIL_CHAIN, anvilTestClient } from "../shared/chain.ts"; - import { typedData } from "../shared/typed-data.ts"; - import { verifyTypedData } from "thirdweb"; import { verifyEOASignature } from "thirdweb/auth"; import { @@ -12,9 +10,9 @@ import { } from "thirdweb/transaction"; import { toUnits, toWei } from "thirdweb/utils"; import { getWalletBalance } from "thirdweb/wallets"; -import { getGcpKmsAccount } from "../../server/utils/wallets/getGcpKmsAccount.ts"; -import { TEST_GCP_KMS_CONFIG } from "../config/gcp-kms.ts"; -import { TEST_CLIENT } from "../shared/client.ts"; +import { getGcpKmsAccount } from "../../src/server/utils/wallets/getGcpKmsAccount"; +import { TEST_GCP_KMS_CONFIG } from "../shared/gcp-kms"; +import { TEST_CLIENT } from "../shared/client"; let account: Awaited>; diff --git a/src/tests/gcp-resource-path.test.ts b/tests/unit/gcp-resource-path.test.ts similarity index 97% rename from src/tests/gcp-resource-path.test.ts rename to tests/unit/gcp-resource-path.test.ts index ae6da618f..52a497d2a 100644 --- a/src/tests/gcp-resource-path.test.ts +++ b/tests/unit/gcp-resource-path.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { getGcpKmsResourcePath, splitGcpKmsResourcePath, -} from "../server/utils/wallets/gcpKmsResourcePath"; +} from "../../src/server/utils/wallets/gcpKmsResourcePath"; describe("splitGcpKmsResourcePath", () => { it("should correctly split a valid GCP KMS resource path", () => { diff --git a/src/tests/math.test.ts b/tests/unit/math.test.ts similarity index 93% rename from src/tests/math.test.ts rename to tests/unit/math.test.ts index 6303d6bed..725084dd1 100644 --- a/src/tests/math.test.ts +++ b/tests/unit/math.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { getPercentile } from "../utils/math"; +import { getPercentile } from "../../src/shared/utils/math"; describe("getPercentile", () => { it("should correctly calculate the p50 (median) of a sorted array", () => { diff --git a/src/tests/schema.test.ts b/tests/unit/schema.test.ts similarity index 97% rename from src/tests/schema.test.ts rename to tests/unit/schema.test.ts index 17f4b167a..c1de80d36 100644 --- a/src/tests/schema.test.ts +++ b/tests/unit/schema.test.ts @@ -4,8 +4,8 @@ import { AddressSchema, HexSchema, TransactionHashSchema, -} from "../server/schemas/address"; -import { chainIdOrSlugSchema } from "../server/schemas/chain"; +} from "../../src/server/schemas/address"; +import { chainIdOrSlugSchema } from "../../src/server/schemas/chain"; // Test cases describe("chainIdOrSlugSchema", () => { diff --git a/src/tests/swr.test.ts b/tests/unit/swr.test.ts similarity index 98% rename from src/tests/swr.test.ts rename to tests/unit/swr.test.ts index ce709ddf3..33fb485ef 100644 --- a/src/tests/swr.test.ts +++ b/tests/unit/swr.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; -import { createSWRCache, type SWRCache } from "../lib/cache/swr"; +import { createSWRCache, type SWRCache } from "../../src/shared/lib/cache/swr"; describe("SWRCache", () => { let cache: SWRCache; diff --git a/src/tests/validator.test.ts b/tests/unit/validator.test.ts similarity index 94% rename from src/tests/validator.test.ts rename to tests/unit/validator.test.ts index 31304c01d..f15612258 100644 --- a/src/tests/validator.test.ts +++ b/tests/unit/validator.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { isValidWebhookUrl } from "../server/utils/validator"; +import { isValidWebhookUrl } from "../../src/server/utils/validator"; describe("isValidWebhookUrl", () => { it("should return true for a valid HTTPS URL", () => { diff --git a/tsconfig.json b/tsconfig.json index e708959bb..6fb9b351a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,5 +25,5 @@ "src/**/*.js", "src/**/*.d.ts" ], - "exclude": ["node_modules", "src/tests/**/*.ts"] + "exclude": ["node_modules", "tests/tests/**/*.ts"] } diff --git a/vitest.config.ts b/vitest.config.ts index cfcdaf467..d2f6a0cda 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,9 +2,8 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { - include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], + include: ["tests/unit/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], exclude: ["tests/e2e/**/*"], - // setupFiles: ["./vitest.setup.ts"], globalSetup: ["./vitest.global-setup.ts"], mockReset: true, }, diff --git a/vitest.global-setup.ts b/vitest.global-setup.ts index 53f215c91..c09752690 100644 --- a/vitest.global-setup.ts +++ b/vitest.global-setup.ts @@ -5,17 +5,19 @@ config({ path: [path.resolve(".env.test.local"), path.resolve(".env.test")], }); -import { createServer } from "prool"; -import { anvil } from "prool/instances"; +// import { createServer } from "prool"; +// import { anvil } from "prool/instances"; -export async function setup() { - const server = createServer({ - instance: anvil(), - port: 8645, // Choose an appropriate port - }); - await server.start(); - // Return a teardown function that will be called after all tests are complete - return async () => { - await server.stop(); - }; -} +// export async function setup() { +// const server = createServer({ +// instance: anvil(), +// port: 8645, // Choose an appropriate port +// }); +// await server.start(); +// // Return a teardown function that will be called after all tests are complete +// return async () => { +// await server.stop(); +// }; +// } + +export async function setup() {} From 8f668fe5eadc41cd68c77dc9ce94144b88fd3aa1 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Fri, 6 Dec 2024 22:52:38 +0800 Subject: [PATCH 26/44] Revert "refactor: clearer folder organization (#792)" (#795) This reverts commit 5d405f037b6110b43c7176cef9d1b7ae2f3543ed. --- .vscode/settings.json | 17 ++++++++ Dockerfile | 1 - package.json | 4 +- src/{shared/schemas => constants}/relayer.ts | 0 .../db/chainIndexers/getChainIndexer.ts | 2 +- .../db/chainIndexers/upsertChainIndexer.ts | 2 +- src/{shared => }/db/client.ts | 6 +-- .../db/configuration/getConfiguration.ts | 6 +-- .../db/configuration/updateConfiguration.ts | 0 .../createContractEventLogs.ts | 4 +- .../deleteContractEventLogs.ts | 0 .../contractEventLogs/getContractEventLogs.ts | 0 .../createContractSubscription.ts | 0 .../deleteContractSubscription.ts | 0 .../getContractSubscriptions.ts | 0 .../createContractTransactionReceipts.ts | 2 +- .../deleteContractTransactionReceipts.ts | 0 .../getContractTransactionReceipts.ts | 0 src/{shared => }/db/keypair/delete.ts | 0 src/{shared => }/db/keypair/get.ts | 0 src/{shared => }/db/keypair/insert.ts | 6 +-- src/{shared => }/db/keypair/list.ts | 0 .../db/permissions/deletePermissions.ts | 0 .../db/permissions/getPermissions.ts | 2 +- .../db/permissions/updatePermissions.ts | 0 src/{shared => }/db/relayer/getRelayerById.ts | 0 src/{shared => }/db/tokens/createToken.ts | 0 src/{shared => }/db/tokens/getAccessTokens.ts | 0 src/{shared => }/db/tokens/getToken.ts | 0 src/{shared => }/db/tokens/revokeToken.ts | 0 src/{shared => }/db/tokens/updateToken.ts | 0 src/{shared => }/db/transactions/db.ts | 0 src/{shared => }/db/transactions/queueTx.ts | 4 +- .../db/wallets/createWalletDetails.ts | 2 +- .../db/wallets/deleteWalletDetails.ts | 0 src/{shared => }/db/wallets/getAllWallets.ts | 2 +- .../db/wallets/getWalletDetails.ts | 2 +- src/{shared => }/db/wallets/nonceMap.ts | 2 +- .../db/wallets/updateWalletDetails.ts | 0 src/{shared => }/db/wallets/walletNonce.ts | 0 src/{shared => }/db/webhooks/createWebhook.ts | 2 +- .../db/webhooks/getAllWebhooks.ts | 0 src/{shared => }/db/webhooks/getWebhook.ts | 0 src/{shared => }/db/webhooks/revokeWebhook.ts | 0 src/index.ts | 7 ++-- src/{shared => }/lib/cache/swr.ts | 0 .../lib/chain/chain-capabilities.ts | 0 .../transaction/get-transaction-receipt.ts | 0 src/polyfill.ts | 2 +- src/{shared/schemas => schema}/config.ts | 0 src/{shared/schemas => schema}/extension.ts | 0 src/{shared/schemas => schema}/prisma.ts | 0 src/{shared/schemas => schema}/wallet.ts | 0 src/{shared/schemas => schema}/webhooks.ts | 0 {scripts => src/scripts}/apply-migrations.ts | 10 ++--- {scripts => src/scripts}/generate-sdk.ts | 0 {scripts => src/scripts}/setup-db.ts | 8 ++-- src/server/index.ts | 10 ++--- src/server/listeners/updateTxListener.ts | 6 +-- src/server/middleware/adminRoutes.ts | 2 +- src/server/middleware/auth.ts | 30 +++++++------- src/server/middleware/cors.ts | 2 +- src/server/middleware/engineMode.ts | 2 +- src/server/middleware/error.ts | 4 +- src/server/middleware/logs.ts | 2 +- src/server/middleware/prometheus.ts | 4 +- src/server/middleware/rateLimit.ts | 4 +- src/server/middleware/websocket.ts | 2 +- src/server/routes/admin/nonces.ts | 14 +++---- src/server/routes/admin/transaction.ts | 14 +++---- .../routes/auth/access-tokens/create.ts | 10 ++--- .../routes/auth/access-tokens/getAll.ts | 2 +- .../routes/auth/access-tokens/revoke.ts | 4 +- .../routes/auth/access-tokens/update.ts | 4 +- src/server/routes/auth/keypair/add.ts | 12 +++--- src/server/routes/auth/keypair/list.ts | 11 ++--- src/server/routes/auth/keypair/remove.ts | 8 ++-- src/server/routes/auth/permissions/getAll.ts | 2 +- src/server/routes/auth/permissions/grant.ts | 4 +- src/server/routes/auth/permissions/revoke.ts | 2 +- .../routes/backend-wallet/cancel-nonces.ts | 6 +-- src/server/routes/backend-wallet/create.ts | 4 +- src/server/routes/backend-wallet/getAll.ts | 2 +- .../routes/backend-wallet/getBalance.ts | 6 +-- src/server/routes/backend-wallet/getNonce.ts | 2 +- .../routes/backend-wallet/getTransactions.ts | 6 +-- .../backend-wallet/getTransactionsByNonce.ts | 8 ++-- src/server/routes/backend-wallet/import.ts | 2 +- src/server/routes/backend-wallet/remove.ts | 8 ++-- .../routes/backend-wallet/reset-nonces.ts | 2 +- .../routes/backend-wallet/sendTransaction.ts | 2 +- .../backend-wallet/sendTransactionBatch.ts | 2 +- .../routes/backend-wallet/signMessage.ts | 6 +-- .../routes/backend-wallet/signTransaction.ts | 6 +-- .../routes/backend-wallet/signTypedData.ts | 6 +-- .../backend-wallet/simulateTransaction.ts | 4 +- src/server/routes/backend-wallet/transfer.ts | 10 ++--- src/server/routes/backend-wallet/update.ts | 6 +-- src/server/routes/backend-wallet/withdraw.ts | 12 +++--- src/server/routes/chain/get.ts | 2 +- src/server/routes/chain/getAll.ts | 2 +- src/server/routes/configuration/auth/get.ts | 6 +-- .../routes/configuration/auth/update.ts | 8 ++-- .../backend-wallet-balance/get.ts | 6 +-- .../backend-wallet-balance/update.ts | 4 +- src/server/routes/configuration/cache/get.ts | 6 +-- .../routes/configuration/cache/update.ts | 12 +++--- src/server/routes/configuration/chains/get.ts | 2 +- .../routes/configuration/chains/update.ts | 6 +-- .../contract-subscriptions/get.ts | 6 +-- .../contract-subscriptions/update.ts | 4 +- src/server/routes/configuration/cors/add.ts | 8 ++-- src/server/routes/configuration/cors/get.ts | 6 +-- .../routes/configuration/cors/remove.ts | 8 ++-- src/server/routes/configuration/cors/set.ts | 4 +- src/server/routes/configuration/ip/get.ts | 6 +-- src/server/routes/configuration/ip/set.ts | 8 ++-- .../routes/configuration/transactions/get.ts | 2 +- .../configuration/transactions/update.ts | 4 +- .../routes/configuration/wallets/get.ts | 4 +- .../routes/configuration/wallets/update.ts | 6 +-- .../routes/contract/events/getAllEvents.ts | 6 +-- .../contract/events/getContractEventLogs.ts | 4 +- .../events/getEventLogsByTimestamp.ts | 2 +- .../routes/contract/events/getEvents.ts | 6 +-- .../contract/events/paginateEventLogs.ts | 4 +- .../extensions/account/read/getAllAdmins.ts | 6 +-- .../extensions/account/read/getAllSessions.ts | 6 +-- .../extensions/account/write/grantAdmin.ts | 4 +- .../extensions/account/write/grantSession.ts | 4 +- .../extensions/account/write/revokeAdmin.ts | 4 +- .../extensions/account/write/revokeSession.ts | 4 +- .../extensions/account/write/updateSession.ts | 4 +- .../accountFactory/read/getAllAccounts.ts | 6 +-- .../read/getAssociatedAccounts.ts | 6 +-- .../accountFactory/read/isAccountDeployed.ts | 6 +-- .../read/predictAccountAddress.ts | 2 +- .../accountFactory/write/createAccount.ts | 6 +-- .../extensions/erc1155/read/balanceOf.ts | 2 +- .../extensions/erc1155/read/canClaim.ts | 2 +- .../contract/extensions/erc1155/read/get.ts | 2 +- .../erc1155/read/getActiveClaimConditions.ts | 2 +- .../extensions/erc1155/read/getAll.ts | 2 +- .../erc1155/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc1155/read/getClaimerProofs.ts | 2 +- .../extensions/erc1155/read/getOwned.ts | 2 +- .../extensions/erc1155/read/isApproved.ts | 2 +- .../erc1155/read/signatureGenerate.ts | 10 ++--- .../extensions/erc1155/read/totalCount.ts | 2 +- .../extensions/erc1155/read/totalSupply.ts | 2 +- .../extensions/erc1155/write/airdrop.ts | 4 +- .../contract/extensions/erc1155/write/burn.ts | 4 +- .../extensions/erc1155/write/burnBatch.ts | 4 +- .../extensions/erc1155/write/claimTo.ts | 6 +-- .../extensions/erc1155/write/lazyMint.ts | 4 +- .../erc1155/write/mintAdditionalSupplyTo.ts | 4 +- .../extensions/erc1155/write/mintBatchTo.ts | 4 +- .../extensions/erc1155/write/mintTo.ts | 4 +- .../erc1155/write/setApprovalForAll.ts | 4 +- .../erc1155/write/setBatchClaimConditions.ts | 4 +- .../erc1155/write/setClaimConditions.ts | 4 +- .../extensions/erc1155/write/signatureMint.ts | 4 +- .../extensions/erc1155/write/transfer.ts | 8 ++-- .../extensions/erc1155/write/transferFrom.ts | 8 ++-- .../erc1155/write/updateClaimConditions.ts | 4 +- .../erc1155/write/updateTokenMetadata.ts | 4 +- .../extensions/erc20/read/allowanceOf.ts | 2 +- .../extensions/erc20/read/balanceOf.ts | 2 +- .../extensions/erc20/read/canClaim.ts | 6 +-- .../contract/extensions/erc20/read/get.ts | 2 +- .../erc20/read/getActiveClaimConditions.ts | 2 +- .../erc20/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../extensions/erc20/read/getClaimerProofs.ts | 2 +- .../erc20/read/signatureGenerate.ts | 10 ++--- .../extensions/erc20/read/totalSupply.ts | 2 +- .../contract/extensions/erc20/write/burn.ts | 4 +- .../extensions/erc20/write/burnFrom.ts | 4 +- .../extensions/erc20/write/claimTo.ts | 6 +-- .../extensions/erc20/write/mintBatchTo.ts | 4 +- .../contract/extensions/erc20/write/mintTo.ts | 4 +- .../extensions/erc20/write/setAllowance.ts | 4 +- .../erc20/write/setClaimConditions.ts | 4 +- .../extensions/erc20/write/signatureMint.ts | 4 +- .../extensions/erc20/write/transfer.ts | 8 ++-- .../extensions/erc20/write/transferFrom.ts | 8 ++-- .../erc20/write/updateClaimConditions.ts | 4 +- .../extensions/erc721/read/balanceOf.ts | 2 +- .../extensions/erc721/read/canClaim.ts | 2 +- .../contract/extensions/erc721/read/get.ts | 2 +- .../erc721/read/getActiveClaimConditions.ts | 2 +- .../contract/extensions/erc721/read/getAll.ts | 2 +- .../erc721/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc721/read/getClaimerProofs.ts | 2 +- .../extensions/erc721/read/getOwned.ts | 2 +- .../extensions/erc721/read/isApproved.ts | 2 +- .../erc721/read/signatureGenerate.ts | 10 ++--- .../erc721/read/signaturePrepare.ts | 6 +-- .../erc721/read/totalClaimedSupply.ts | 2 +- .../extensions/erc721/read/totalCount.ts | 2 +- .../erc721/read/totalUnclaimedSupply.ts | 2 +- .../contract/extensions/erc721/write/burn.ts | 4 +- .../extensions/erc721/write/claimTo.ts | 6 +-- .../extensions/erc721/write/lazyMint.ts | 8 ++-- .../extensions/erc721/write/mintBatchTo.ts | 8 ++-- .../extensions/erc721/write/mintTo.ts | 8 ++-- .../erc721/write/setApprovalForAll.ts | 8 ++-- .../erc721/write/setApprovalForToken.ts | 8 ++-- .../erc721/write/setClaimConditions.ts | 10 ++--- .../extensions/erc721/write/signatureMint.ts | 18 ++++---- .../extensions/erc721/write/transfer.ts | 8 ++-- .../extensions/erc721/write/transferFrom.ts | 8 ++-- .../erc721/write/updateClaimConditions.ts | 10 ++--- .../erc721/write/updateTokenMetadata.ts | 8 ++-- .../directListings/read/getAll.ts | 2 +- .../directListings/read/getAllValid.ts | 2 +- .../directListings/read/getListing.ts | 2 +- .../directListings/read/getTotalCount.ts | 2 +- .../read/isBuyerApprovedForListing.ts | 2 +- .../read/isCurrencyApprovedForListing.ts | 2 +- .../write/approveBuyerForReservedListing.ts | 4 +- .../directListings/write/buyFromListing.ts | 4 +- .../directListings/write/cancelListing.ts | 4 +- .../directListings/write/createListing.ts | 4 +- .../revokeBuyerApprovalForReservedListing.ts | 4 +- .../write/revokeCurrencyApprovalForListing.ts | 4 +- .../directListings/write/updateListing.ts | 4 +- .../englishAuctions/read/getAll.ts | 2 +- .../englishAuctions/read/getAllValid.ts | 2 +- .../englishAuctions/read/getAuction.ts | 2 +- .../englishAuctions/read/getBidBufferBps.ts | 2 +- .../englishAuctions/read/getMinimumNextBid.ts | 2 +- .../englishAuctions/read/getTotalCount.ts | 2 +- .../englishAuctions/read/getWinner.ts | 2 +- .../englishAuctions/read/getWinningBid.ts | 2 +- .../englishAuctions/read/isWinningBid.ts | 2 +- .../englishAuctions/write/buyoutAuction.ts | 4 +- .../englishAuctions/write/cancelAuction.ts | 4 +- .../write/closeAuctionForBidder.ts | 4 +- .../write/closeAuctionForSeller.ts | 4 +- .../englishAuctions/write/createAuction.ts | 4 +- .../englishAuctions/write/executeSale.ts | 4 +- .../englishAuctions/write/makeBid.ts | 4 +- .../marketplaceV3/offers/read/getAll.ts | 2 +- .../marketplaceV3/offers/read/getAllValid.ts | 2 +- .../marketplaceV3/offers/read/getOffer.ts | 2 +- .../offers/read/getTotalCount.ts | 2 +- .../marketplaceV3/offers/write/acceptOffer.ts | 4 +- .../marketplaceV3/offers/write/cancelOffer.ts | 4 +- .../marketplaceV3/offers/write/makeOffer.ts | 4 +- src/server/routes/contract/metadata/abi.ts | 2 +- src/server/routes/contract/metadata/events.ts | 2 +- .../routes/contract/metadata/extensions.ts | 6 +-- .../routes/contract/metadata/functions.ts | 6 +-- src/server/routes/contract/read/read.ts | 4 +- src/server/routes/contract/roles/read/get.ts | 2 +- .../routes/contract/roles/read/getAll.ts | 2 +- .../routes/contract/roles/write/grant.ts | 4 +- .../routes/contract/roles/write/revoke.ts | 4 +- .../royalties/read/getDefaultRoyaltyInfo.ts | 6 +-- .../royalties/read/getTokenRoyaltyInfo.ts | 2 +- .../royalties/write/setDefaultRoyaltyInfo.ts | 8 ++-- .../royalties/write/setTokenRoyaltyInfo.ts | 8 ++-- .../subscriptions/addContractSubscription.ts | 20 ++++----- .../getContractIndexedBlockRange.ts | 2 +- .../subscriptions/getContractSubscriptions.ts | 6 +-- .../contract/subscriptions/getLatestBlock.ts | 2 +- .../removeContractSubscription.ts | 8 ++-- .../transactions/getTransactionReceipts.ts | 8 ++-- .../getTransactionReceiptsByTimestamp.ts | 2 +- .../paginateTransactionReceipts.ts | 4 +- src/server/routes/contract/write/write.ts | 6 +-- src/server/routes/deploy/prebuilt.ts | 10 ++--- src/server/routes/deploy/prebuilts/edition.ts | 10 ++--- .../routes/deploy/prebuilts/editionDrop.ts | 10 ++--- .../routes/deploy/prebuilts/marketplaceV3.ts | 10 ++--- .../routes/deploy/prebuilts/multiwrap.ts | 10 ++--- .../routes/deploy/prebuilts/nftCollection.ts | 10 ++--- src/server/routes/deploy/prebuilts/nftDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/pack.ts | 10 ++--- .../routes/deploy/prebuilts/signatureDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/split.ts | 10 ++--- src/server/routes/deploy/prebuilts/token.ts | 10 ++--- .../routes/deploy/prebuilts/tokenDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/vote.ts | 10 ++--- src/server/routes/deploy/published.ts | 8 ++-- src/server/routes/relayer/create.ts | 2 +- src/server/routes/relayer/getAll.ts | 2 +- src/server/routes/relayer/index.ts | 8 ++-- src/server/routes/relayer/revoke.ts | 2 +- src/server/routes/relayer/update.ts | 2 +- src/server/routes/system/health.ts | 8 ++-- src/server/routes/system/queue.ts | 6 +-- .../routes/transaction/blockchain/getLogs.ts | 8 ++-- .../transaction/blockchain/getReceipt.ts | 4 +- .../blockchain/getUserOpReceipt.ts | 2 +- .../transaction/blockchain/sendSignedTx.ts | 4 +- .../blockchain/sendSignedUserOp.ts | 4 +- src/server/routes/transaction/cancel.ts | 18 ++++---- src/server/routes/transaction/getAll.ts | 2 +- .../transaction/getAllDeployedContracts.ts | 6 +-- src/server/routes/transaction/retry-failed.ts | 6 +-- src/server/routes/transaction/retry.ts | 10 ++--- src/server/routes/transaction/status.ts | 10 ++--- src/server/routes/transaction/sync-retry.ts | 21 ++++------ src/server/routes/webhooks/create.ts | 8 ++-- src/server/routes/webhooks/events.ts | 6 +-- src/server/routes/webhooks/getAll.ts | 2 +- src/server/routes/webhooks/revoke.ts | 4 +- src/server/routes/webhooks/test.ts | 4 +- .../auth.ts => server/schemas/auth/index.ts} | 0 .../keypair.ts => server/schemas/keypairs.ts} | 4 +- src/server/schemas/transaction/index.ts | 2 +- src/server/schemas/wallet/index.ts | 2 +- src/server/utils/chain.ts | 2 +- src/server/utils/storage/localStorage.ts | 8 ++-- src/server/utils/transactionOverrides.ts | 4 +- .../utils/wallets/createGcpKmsWallet.ts | 6 +-- src/server/utils/wallets/createLocalWallet.ts | 6 +-- src/server/utils/wallets/createSmartWallet.ts | 6 +-- .../utils/wallets/fetchAwsKmsWalletParams.ts | 2 +- .../utils/wallets/fetchGcpKmsWalletParams.ts | 2 +- src/server/utils/wallets/getAwsKmsAccount.ts | 2 +- src/server/utils/wallets/getGcpKmsAccount.ts | 2 +- src/server/utils/wallets/getLocalWallet.ts | 10 ++--- src/server/utils/wallets/getSmartWallet.ts | 6 +-- .../utils/wallets/importAwsKmsWallet.ts | 6 +-- .../utils/wallets/importGcpKmsWallet.ts | 6 +-- src/server/utils/wallets/importLocalWallet.ts | 2 +- src/server/utils/websocket.ts | 12 +++--- {tests/unit => src/tests}/auth.test.ts | 27 ++++++------ {tests/unit => src/tests}/aws-arn.test.ts | 2 +- {tests/unit => src/tests}/chain.test.ts | 4 +- {tests/shared => src/tests/config}/aws-kms.ts | 0 {tests/shared => src/tests/config}/gcp-kms.ts | 0 .../tests}/gcp-resource-path.test.ts | 2 +- {tests/unit => src/tests}/math.test.ts | 2 +- {tests/unit => src/tests}/schema.test.ts | 4 +- {tests => src/tests}/shared/chain.ts | 0 {tests => src/tests}/shared/client.ts | 0 {tests => src/tests}/shared/typed-data.ts | 0 {tests/unit => src/tests}/swr.test.ts | 2 +- {tests/unit => src/tests}/validator.test.ts | 2 +- .../tests/wallets}/aws-kms.test.ts | 7 +++- .../tests/wallets}/gcp-kms.test.ts | 8 ++-- src/{shared => }/utils/account.ts | 12 +++--- src/{shared => }/utils/auth.ts | 0 src/{shared => }/utils/block.ts | 0 src/{shared => }/utils/cache/accessToken.ts | 0 src/{shared => }/utils/cache/authWallet.ts | 0 src/{shared => }/utils/cache/clearCache.ts | 0 src/{shared => }/utils/cache/getConfig.ts | 2 +- src/{shared => }/utils/cache/getContract.ts | 6 +-- src/{shared => }/utils/cache/getContractv5.ts | 0 src/{shared => }/utils/cache/getSdk.ts | 2 +- .../utils/cache/getSmartWalletV5.ts | 0 src/{shared => }/utils/cache/getWallet.ts | 14 +++---- src/{shared => }/utils/cache/getWebhook.ts | 2 +- src/{shared => }/utils/cache/keypair.ts | 0 src/{shared => }/utils/chain.ts | 0 src/{shared => }/utils/cron/clearCacheCron.ts | 0 src/{shared => }/utils/cron/isValidCron.ts | 2 +- src/{shared => }/utils/crypto.ts | 0 src/{shared => }/utils/date.ts | 0 src/{shared => }/utils/env.ts | 0 src/{shared => }/utils/error.ts | 0 src/{shared => }/utils/ethers.ts | 0 .../utils/indexer/getBlockTime.ts | 0 src/{shared => }/utils/logger.ts | 0 src/{shared => }/utils/math.ts | 0 src/{shared => }/utils/primitiveTypes.ts | 0 src/{shared => }/utils/prometheus.ts | 2 +- src/{shared => }/utils/redis/lock.ts | 0 src/{shared => }/utils/redis/redis.ts | 0 src/{shared => }/utils/sdk.ts | 0 src/{ => utils}/tracer.ts | 2 +- .../utils/transaction/cancelTransaction.ts | 0 .../utils/transaction/insertTransaction.ts | 8 ++-- .../utils/transaction/queueTransation.ts | 6 +-- .../transaction/simulateQueuedTransaction.ts | 0 src/{shared => }/utils/transaction/types.ts | 0 src/{shared => }/utils/transaction/webhook.ts | 4 +- src/{shared => }/utils/usage.ts | 18 ++++---- src/{shared => }/utils/webhook.ts | 0 src/worker/indexers/chainIndexerRegistry.ts | 4 +- src/worker/listeners/chainIndexerListener.ts | 4 +- src/worker/listeners/configListener.ts | 8 ++-- src/worker/listeners/webhookListener.ts | 6 +-- .../queues/cancelRecycledNoncesQueue.ts | 2 +- .../migratePostgresTransactionsQueue.ts | 2 +- src/worker/queues/mineTransactionQueue.ts | 2 +- src/worker/queues/nonceHealthCheckQueue.ts | 2 +- src/worker/queues/nonceResyncQueue.ts | 2 +- src/worker/queues/processEventLogsQueue.ts | 6 +-- .../queues/processTransactionReceiptsQueue.ts | 6 +-- src/worker/queues/pruneTransactionsQueue.ts | 2 +- src/worker/queues/queues.ts | 4 +- src/worker/queues/sendTransactionQueue.ts | 2 +- src/worker/queues/sendWebhookQueue.ts | 8 ++-- .../tasks/cancelRecycledNoncesWorker.ts | 14 +++---- src/worker/tasks/chainIndexer.ts | 14 +++---- src/worker/tasks/manageChainIndexers.ts | 2 +- .../migratePostgresTransactionsWorker.ts | 19 ++++----- src/worker/tasks/mineTransactionWorker.ts | 39 ++++++++---------- src/worker/tasks/nonceHealthCheckWorker.ts | 6 +-- src/worker/tasks/nonceResyncWorker.ts | 14 +++---- src/worker/tasks/processEventLogsWorker.ts | 18 ++++---- .../tasks/processTransactionReceiptsWorker.ts | 18 ++++---- src/worker/tasks/pruneTransactionsWorker.ts | 8 ++-- src/worker/tasks/sendTransactionWorker.ts | 30 +++++++------- src/worker/tasks/sendWebhookWorker.ts | 13 +++--- src/worker/utils/contractId.ts | 2 + src/worker/utils/nonce.ts | 25 +++++++++++ {tests => test}/e2e/.env.test.example | 0 {tests => test}/e2e/.gitignore | 0 {tests => test}/e2e/README.md | 0 {tests => test}/e2e/bun.lockb | Bin {tests => test}/e2e/config.ts | 0 {tests => test}/e2e/package.json | 0 {tests => test}/e2e/scripts/counter.ts | 4 +- {tests => test}/e2e/tests/extensions.test.ts | 2 +- {tests => test}/e2e/tests/load.test.ts | 2 +- {tests => test}/e2e/tests/read.test.ts | 2 +- .../e2e/tests/routes/erc1155-transfer.test.ts | 0 .../e2e/tests/routes/erc20-transfer.test.ts | 2 +- .../e2e/tests/routes/erc721-transfer.test.ts | 0 .../e2e/tests/routes/signMessage.test.ts | 0 .../e2e/tests/routes/signaturePrepare.test.ts | 0 .../e2e/tests/routes/write.test.ts | 8 ++-- {tests => test}/e2e/tests/setup.ts | 2 +- .../e2e/tests/sign-transaction.test.ts | 0 .../smart-aws-wallet.test.ts | 0 .../smart-gcp-wallet.test.ts | 0 .../smart-local-wallet-sdk-v4.test.ts | 0 .../smart-local-wallet.test.ts | 0 {tests => test}/e2e/tests/smoke.test.ts | 0 {tests => test}/e2e/tests/userop.test.ts | 2 +- .../e2e/tests/utils/getBlockTime.test.ts | 0 {tests => test}/e2e/tsconfig.json | 0 {tests => test}/e2e/utils/anvil.ts | 0 {tests => test}/e2e/utils/engine.ts | 2 +- {tests => test}/e2e/utils/statistics.ts | 0 {tests => test}/e2e/utils/transactions.ts | 4 +- {tests => test}/e2e/utils/wallets.ts | 0 tsconfig.json | 2 +- vitest.config.ts | 3 +- vitest.global-setup.ts | 28 ++++++------- 449 files changed, 1000 insertions(+), 978 deletions(-) create mode 100644 .vscode/settings.json rename src/{shared/schemas => constants}/relayer.ts (100%) rename src/{shared => }/db/chainIndexers/getChainIndexer.ts (94%) rename src/{shared => }/db/chainIndexers/upsertChainIndexer.ts (91%) rename src/{shared => }/db/client.ts (84%) rename src/{shared => }/db/configuration/getConfiguration.ts (98%) rename src/{shared => }/db/configuration/updateConfiguration.ts (100%) rename src/{shared => }/db/contractEventLogs/createContractEventLogs.ts (78%) rename src/{shared => }/db/contractEventLogs/deleteContractEventLogs.ts (100%) rename src/{shared => }/db/contractEventLogs/getContractEventLogs.ts (100%) rename src/{shared => }/db/contractSubscriptions/createContractSubscription.ts (100%) rename src/{shared => }/db/contractSubscriptions/deleteContractSubscription.ts (100%) rename src/{shared => }/db/contractSubscriptions/getContractSubscriptions.ts (100%) rename src/{shared => }/db/contractTransactionReceipts/createContractTransactionReceipts.ts (91%) rename src/{shared => }/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts (100%) rename src/{shared => }/db/contractTransactionReceipts/getContractTransactionReceipts.ts (100%) rename src/{shared => }/db/keypair/delete.ts (100%) rename src/{shared => }/db/keypair/get.ts (100%) rename src/{shared => }/db/keypair/insert.ts (72%) rename src/{shared => }/db/keypair/list.ts (100%) rename src/{shared => }/db/permissions/deletePermissions.ts (100%) rename src/{shared => }/db/permissions/getPermissions.ts (92%) rename src/{shared => }/db/permissions/updatePermissions.ts (100%) rename src/{shared => }/db/relayer/getRelayerById.ts (100%) rename src/{shared => }/db/tokens/createToken.ts (100%) rename src/{shared => }/db/tokens/getAccessTokens.ts (100%) rename src/{shared => }/db/tokens/getToken.ts (100%) rename src/{shared => }/db/tokens/revokeToken.ts (100%) rename src/{shared => }/db/tokens/updateToken.ts (100%) rename src/{shared => }/db/transactions/db.ts (100%) rename src/{shared => }/db/transactions/queueTx.ts (95%) rename src/{shared => }/db/wallets/createWalletDetails.ts (98%) rename src/{shared => }/db/wallets/deleteWalletDetails.ts (100%) rename src/{shared => }/db/wallets/getAllWallets.ts (86%) rename src/{shared => }/db/wallets/getWalletDetails.ts (99%) rename src/{shared => }/db/wallets/nonceMap.ts (98%) rename src/{shared => }/db/wallets/updateWalletDetails.ts (100%) rename src/{shared => }/db/wallets/walletNonce.ts (100%) rename src/{shared => }/db/webhooks/createWebhook.ts (91%) rename src/{shared => }/db/webhooks/getAllWebhooks.ts (100%) rename src/{shared => }/db/webhooks/getWebhook.ts (100%) rename src/{shared => }/db/webhooks/revokeWebhook.ts (100%) rename src/{shared => }/lib/cache/swr.ts (100%) rename src/{shared => }/lib/chain/chain-capabilities.ts (100%) rename src/{shared => }/lib/transaction/get-transaction-receipt.ts (100%) rename src/{shared/schemas => schema}/config.ts (100%) rename src/{shared/schemas => schema}/extension.ts (100%) rename src/{shared/schemas => schema}/prisma.ts (100%) rename src/{shared/schemas => schema}/wallet.ts (100%) rename src/{shared/schemas => schema}/webhooks.ts (100%) rename {scripts => src/scripts}/apply-migrations.ts (88%) rename {scripts => src/scripts}/generate-sdk.ts (100%) rename {scripts => src/scripts}/setup-db.ts (79%) rename src/{shared/schemas/auth.ts => server/schemas/auth/index.ts} (100%) rename src/{shared/schemas/keypair.ts => server/schemas/keypairs.ts} (93%) rename {tests/unit => src/tests}/auth.test.ts (96%) rename {tests/unit => src/tests}/aws-arn.test.ts (97%) rename {tests/unit => src/tests}/chain.test.ts (96%) rename {tests/shared => src/tests/config}/aws-kms.ts (100%) rename {tests/shared => src/tests/config}/gcp-kms.ts (100%) rename {tests/unit => src/tests}/gcp-resource-path.test.ts (97%) rename {tests/unit => src/tests}/math.test.ts (93%) rename {tests/unit => src/tests}/schema.test.ts (97%) rename {tests => src/tests}/shared/chain.ts (100%) rename {tests => src/tests}/shared/client.ts (100%) rename {tests => src/tests}/shared/typed-data.ts (100%) rename {tests/unit => src/tests}/swr.test.ts (98%) rename {tests/unit => src/tests}/validator.test.ts (94%) rename {tests/unit => src/tests/wallets}/aws-kms.test.ts (95%) rename {tests/unit => src/tests/wallets}/gcp-kms.test.ts (94%) rename src/{shared => }/utils/account.ts (93%) rename src/{shared => }/utils/auth.ts (100%) rename src/{shared => }/utils/block.ts (100%) rename src/{shared => }/utils/cache/accessToken.ts (100%) rename src/{shared => }/utils/cache/authWallet.ts (100%) rename src/{shared => }/utils/cache/clearCache.ts (100%) rename src/{shared => }/utils/cache/getConfig.ts (86%) rename src/{shared => }/utils/cache/getContract.ts (82%) rename src/{shared => }/utils/cache/getContractv5.ts (100%) rename src/{shared => }/utils/cache/getSdk.ts (97%) rename src/{shared => }/utils/cache/getSmartWalletV5.ts (100%) rename src/{shared => }/utils/cache/getWallet.ts (91%) rename src/{shared => }/utils/cache/getWebhook.ts (91%) rename src/{shared => }/utils/cache/keypair.ts (100%) rename src/{shared => }/utils/chain.ts (100%) rename src/{shared => }/utils/cron/clearCacheCron.ts (100%) rename src/{shared => }/utils/cron/isValidCron.ts (96%) rename src/{shared => }/utils/crypto.ts (100%) rename src/{shared => }/utils/date.ts (100%) rename src/{shared => }/utils/env.ts (100%) rename src/{shared => }/utils/error.ts (100%) rename src/{shared => }/utils/ethers.ts (100%) rename src/{shared => }/utils/indexer/getBlockTime.ts (100%) rename src/{shared => }/utils/logger.ts (100%) rename src/{shared => }/utils/math.ts (100%) rename src/{shared => }/utils/primitiveTypes.ts (100%) rename src/{shared => }/utils/prometheus.ts (98%) rename src/{shared => }/utils/redis/lock.ts (100%) rename src/{shared => }/utils/redis/redis.ts (100%) rename src/{shared => }/utils/sdk.ts (100%) rename src/{ => utils}/tracer.ts (79%) rename src/{shared => }/utils/transaction/cancelTransaction.ts (100%) rename src/{shared => }/utils/transaction/insertTransaction.ts (95%) rename src/{shared => }/utils/transaction/queueTransation.ts (90%) rename src/{shared => }/utils/transaction/simulateQueuedTransaction.ts (100%) rename src/{shared => }/utils/transaction/types.ts (100%) rename src/{shared => }/utils/transaction/webhook.ts (80%) rename src/{shared => }/utils/usage.ts (86%) rename src/{shared => }/utils/webhook.ts (100%) create mode 100644 src/worker/utils/contractId.ts create mode 100644 src/worker/utils/nonce.ts rename {tests => test}/e2e/.env.test.example (100%) rename {tests => test}/e2e/.gitignore (100%) rename {tests => test}/e2e/README.md (100%) rename {tests => test}/e2e/bun.lockb (100%) rename {tests => test}/e2e/config.ts (100%) rename {tests => test}/e2e/package.json (100%) rename {tests => test}/e2e/scripts/counter.ts (90%) rename {tests => test}/e2e/tests/extensions.test.ts (98%) rename {tests => test}/e2e/tests/load.test.ts (98%) rename {tests => test}/e2e/tests/read.test.ts (99%) rename {tests => test}/e2e/tests/routes/erc1155-transfer.test.ts (100%) rename {tests => test}/e2e/tests/routes/erc20-transfer.test.ts (99%) rename {tests => test}/e2e/tests/routes/erc721-transfer.test.ts (100%) rename {tests => test}/e2e/tests/routes/signMessage.test.ts (100%) rename {tests => test}/e2e/tests/routes/signaturePrepare.test.ts (100%) rename {tests => test}/e2e/tests/routes/write.test.ts (97%) rename {tests => test}/e2e/tests/setup.ts (96%) rename {tests => test}/e2e/tests/sign-transaction.test.ts (100%) rename {tests => test}/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts (100%) rename {tests => test}/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts (100%) rename {tests => test}/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts (100%) rename {tests => test}/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts (100%) rename {tests => test}/e2e/tests/smoke.test.ts (100%) rename {tests => test}/e2e/tests/userop.test.ts (98%) rename {tests => test}/e2e/tests/utils/getBlockTime.test.ts (100%) rename {tests => test}/e2e/tsconfig.json (100%) rename {tests => test}/e2e/utils/anvil.ts (100%) rename {tests => test}/e2e/utils/engine.ts (95%) rename {tests => test}/e2e/utils/statistics.ts (100%) rename {tests => test}/e2e/utils/transactions.ts (95%) rename {tests => test}/e2e/utils/wallets.ts (100%) diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..3bbcfc60d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,17 @@ +{ + "editor.codeActionsOnSave": { + "source.organizeImports": "explicit", + "source.eslint.fixAll": "explicit" + }, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }], + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true, + "[prisma]": { + "editor.defaultFormatter": "Prisma.prisma" + }, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" + } +} diff --git a/Dockerfile b/Dockerfile index 9728e659f..4cf99266f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,7 +64,6 @@ COPY --from=build /app/package.json . COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/src/prisma/* ./src/prisma/ COPY --from=build /app/dist ./dist -COPY --from=build /app/scripts ./dist/scripts # Replace the schema path in the package.json file RUN sed -i 's_"schema": "./src/prisma/schema.prisma"_"schema": "./dist/prisma/schema.prisma"_g' package.json diff --git a/package.json b/package.json index f8497a342..371ab1621 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "dev:run": "npx nodemon --watch 'src/**/*.ts' --exec 'npx tsx ./src/index.ts' --files src/index.ts", "build": "rm -rf dist && tsc -p ./tsconfig.json --outDir dist", "build:docker": "docker build . -f Dockerfile -t prod", - "generate:sdk": "npx tsx ./scripts/generate-sdk && cd ./sdk && yarn build", - "prisma:setup:dev": "npx tsx ./scripts/setup-db.ts", + "generate:sdk": "npx tsx ./src/scripts/generate-sdk && cd ./sdk && yarn build", + "prisma:setup:dev": "npx tsx ./src/scripts/setup-db.ts", "prisma:setup:prod": "npx tsx ./dist/scripts/setup-db.js", "start": "yarn prisma:setup:prod && yarn start:migrations && yarn start:run", "start:migrations": "npx tsx ./dist/scripts/apply-migrations.js", diff --git a/src/shared/schemas/relayer.ts b/src/constants/relayer.ts similarity index 100% rename from src/shared/schemas/relayer.ts rename to src/constants/relayer.ts diff --git a/src/shared/db/chainIndexers/getChainIndexer.ts b/src/db/chainIndexers/getChainIndexer.ts similarity index 94% rename from src/shared/db/chainIndexers/getChainIndexer.ts rename to src/db/chainIndexers/getChainIndexer.ts index ae7f3e7e8..166c2f228 100644 --- a/src/shared/db/chainIndexers/getChainIndexer.ts +++ b/src/db/chainIndexers/getChainIndexer.ts @@ -1,5 +1,5 @@ import { Prisma } from "@prisma/client"; -import type { PrismaTransaction } from "../../schemas/prisma"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetLastIndexedBlockParams { diff --git a/src/shared/db/chainIndexers/upsertChainIndexer.ts b/src/db/chainIndexers/upsertChainIndexer.ts similarity index 91% rename from src/shared/db/chainIndexers/upsertChainIndexer.ts rename to src/db/chainIndexers/upsertChainIndexer.ts index 744a12a81..123a2a464 100644 --- a/src/shared/db/chainIndexers/upsertChainIndexer.ts +++ b/src/db/chainIndexers/upsertChainIndexer.ts @@ -1,4 +1,4 @@ -import type { PrismaTransaction } from "../../schemas/prisma"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface UpsertChainIndexerParams { diff --git a/src/shared/db/client.ts b/src/db/client.ts similarity index 84% rename from src/shared/db/client.ts rename to src/db/client.ts index 9c57b1417..bddb0eafe 100644 --- a/src/shared/db/client.ts +++ b/src/db/client.ts @@ -1,6 +1,6 @@ import { PrismaClient } from "@prisma/client"; -import pg, { type Knex } from "knex"; -import type { PrismaTransaction } from "../schemas/prisma"; +import pg, { Knex } from "knex"; +import { PrismaTransaction } from "../schema/prisma"; import { env } from "../utils/env"; export const prisma = new PrismaClient({ @@ -26,7 +26,7 @@ export const isDatabaseReachable = async () => { try { await prisma.walletDetails.findFirst(); return true; - } catch { + } catch (error) { return false; } }; diff --git a/src/shared/db/configuration/getConfiguration.ts b/src/db/configuration/getConfiguration.ts similarity index 98% rename from src/shared/db/configuration/getConfiguration.ts rename to src/db/configuration/getConfiguration.ts index 5d1698ccd..67c47f9a6 100644 --- a/src/shared/db/configuration/getConfiguration.ts +++ b/src/db/configuration/getConfiguration.ts @@ -7,9 +7,9 @@ import type { AwsWalletConfiguration, GcpWalletConfiguration, ParsedConfig, -} from "../../schemas/config"; -import { WalletType } from "../../schemas/wallet"; -import { mandatoryAllowedCorsUrls } from "../../../server/utils/cors-urls"; +} from "../../schema/config"; +import { WalletType } from "../../schema/wallet"; +import { mandatoryAllowedCorsUrls } from "../../server/utils/cors-urls"; import type { networkResponseSchema } from "../../utils/cache/getSdk"; import { decrypt } from "../../utils/crypto"; import { env } from "../../utils/env"; diff --git a/src/shared/db/configuration/updateConfiguration.ts b/src/db/configuration/updateConfiguration.ts similarity index 100% rename from src/shared/db/configuration/updateConfiguration.ts rename to src/db/configuration/updateConfiguration.ts diff --git a/src/shared/db/contractEventLogs/createContractEventLogs.ts b/src/db/contractEventLogs/createContractEventLogs.ts similarity index 78% rename from src/shared/db/contractEventLogs/createContractEventLogs.ts rename to src/db/contractEventLogs/createContractEventLogs.ts index 5b4c94e13..cb498e9c1 100644 --- a/src/shared/db/contractEventLogs/createContractEventLogs.ts +++ b/src/db/contractEventLogs/createContractEventLogs.ts @@ -1,5 +1,5 @@ -import type { ContractEventLogs, Prisma } from "@prisma/client"; -import type { PrismaTransaction } from "../../schemas/prisma"; +import { ContractEventLogs, Prisma } from "@prisma/client"; +import { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/shared/db/contractEventLogs/deleteContractEventLogs.ts b/src/db/contractEventLogs/deleteContractEventLogs.ts similarity index 100% rename from src/shared/db/contractEventLogs/deleteContractEventLogs.ts rename to src/db/contractEventLogs/deleteContractEventLogs.ts diff --git a/src/shared/db/contractEventLogs/getContractEventLogs.ts b/src/db/contractEventLogs/getContractEventLogs.ts similarity index 100% rename from src/shared/db/contractEventLogs/getContractEventLogs.ts rename to src/db/contractEventLogs/getContractEventLogs.ts diff --git a/src/shared/db/contractSubscriptions/createContractSubscription.ts b/src/db/contractSubscriptions/createContractSubscription.ts similarity index 100% rename from src/shared/db/contractSubscriptions/createContractSubscription.ts rename to src/db/contractSubscriptions/createContractSubscription.ts diff --git a/src/shared/db/contractSubscriptions/deleteContractSubscription.ts b/src/db/contractSubscriptions/deleteContractSubscription.ts similarity index 100% rename from src/shared/db/contractSubscriptions/deleteContractSubscription.ts rename to src/db/contractSubscriptions/deleteContractSubscription.ts diff --git a/src/shared/db/contractSubscriptions/getContractSubscriptions.ts b/src/db/contractSubscriptions/getContractSubscriptions.ts similarity index 100% rename from src/shared/db/contractSubscriptions/getContractSubscriptions.ts rename to src/db/contractSubscriptions/getContractSubscriptions.ts diff --git a/src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts b/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts similarity index 91% rename from src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts rename to src/db/contractTransactionReceipts/createContractTransactionReceipts.ts index ac3396516..1cd733b4c 100644 --- a/src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts +++ b/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts @@ -1,5 +1,5 @@ import { ContractTransactionReceipts, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schemas/prisma"; +import { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/shared/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts b/src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts similarity index 100% rename from src/shared/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts rename to src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts diff --git a/src/shared/db/contractTransactionReceipts/getContractTransactionReceipts.ts b/src/db/contractTransactionReceipts/getContractTransactionReceipts.ts similarity index 100% rename from src/shared/db/contractTransactionReceipts/getContractTransactionReceipts.ts rename to src/db/contractTransactionReceipts/getContractTransactionReceipts.ts diff --git a/src/shared/db/keypair/delete.ts b/src/db/keypair/delete.ts similarity index 100% rename from src/shared/db/keypair/delete.ts rename to src/db/keypair/delete.ts diff --git a/src/shared/db/keypair/get.ts b/src/db/keypair/get.ts similarity index 100% rename from src/shared/db/keypair/get.ts rename to src/db/keypair/get.ts diff --git a/src/shared/db/keypair/insert.ts b/src/db/keypair/insert.ts similarity index 72% rename from src/shared/db/keypair/insert.ts rename to src/db/keypair/insert.ts index 77f1ada59..c6d7b737d 100644 --- a/src/shared/db/keypair/insert.ts +++ b/src/db/keypair/insert.ts @@ -1,6 +1,6 @@ -import type { Keypairs } from "@prisma/client"; -import { createHash } from "node:crypto"; -import type { KeypairAlgorithm } from "../../schemas/keypair"; +import { Keypairs } from "@prisma/client"; +import { createHash } from "crypto"; +import { KeypairAlgorithm } from "../../server/schemas/keypairs"; import { prisma } from "../client"; export const insertKeypair = async ({ diff --git a/src/shared/db/keypair/list.ts b/src/db/keypair/list.ts similarity index 100% rename from src/shared/db/keypair/list.ts rename to src/db/keypair/list.ts diff --git a/src/shared/db/permissions/deletePermissions.ts b/src/db/permissions/deletePermissions.ts similarity index 100% rename from src/shared/db/permissions/deletePermissions.ts rename to src/db/permissions/deletePermissions.ts diff --git a/src/shared/db/permissions/getPermissions.ts b/src/db/permissions/getPermissions.ts similarity index 92% rename from src/shared/db/permissions/getPermissions.ts rename to src/db/permissions/getPermissions.ts index 7017ae12e..6d178b5eb 100644 --- a/src/shared/db/permissions/getPermissions.ts +++ b/src/db/permissions/getPermissions.ts @@ -1,4 +1,4 @@ -import { Permission } from "../../schemas/auth"; +import { Permission } from "../../server/schemas/auth"; import { env } from "../../utils/env"; import { prisma } from "../client"; diff --git a/src/shared/db/permissions/updatePermissions.ts b/src/db/permissions/updatePermissions.ts similarity index 100% rename from src/shared/db/permissions/updatePermissions.ts rename to src/db/permissions/updatePermissions.ts diff --git a/src/shared/db/relayer/getRelayerById.ts b/src/db/relayer/getRelayerById.ts similarity index 100% rename from src/shared/db/relayer/getRelayerById.ts rename to src/db/relayer/getRelayerById.ts diff --git a/src/shared/db/tokens/createToken.ts b/src/db/tokens/createToken.ts similarity index 100% rename from src/shared/db/tokens/createToken.ts rename to src/db/tokens/createToken.ts diff --git a/src/shared/db/tokens/getAccessTokens.ts b/src/db/tokens/getAccessTokens.ts similarity index 100% rename from src/shared/db/tokens/getAccessTokens.ts rename to src/db/tokens/getAccessTokens.ts diff --git a/src/shared/db/tokens/getToken.ts b/src/db/tokens/getToken.ts similarity index 100% rename from src/shared/db/tokens/getToken.ts rename to src/db/tokens/getToken.ts diff --git a/src/shared/db/tokens/revokeToken.ts b/src/db/tokens/revokeToken.ts similarity index 100% rename from src/shared/db/tokens/revokeToken.ts rename to src/db/tokens/revokeToken.ts diff --git a/src/shared/db/tokens/updateToken.ts b/src/db/tokens/updateToken.ts similarity index 100% rename from src/shared/db/tokens/updateToken.ts rename to src/db/tokens/updateToken.ts diff --git a/src/shared/db/transactions/db.ts b/src/db/transactions/db.ts similarity index 100% rename from src/shared/db/transactions/db.ts rename to src/db/transactions/db.ts diff --git a/src/shared/db/transactions/queueTx.ts b/src/db/transactions/queueTx.ts similarity index 95% rename from src/shared/db/transactions/queueTx.ts rename to src/db/transactions/queueTx.ts index 4c12eeae0..76baa3656 100644 --- a/src/shared/db/transactions/queueTx.ts +++ b/src/db/transactions/queueTx.ts @@ -1,11 +1,11 @@ import type { DeployTransaction, Transaction } from "@thirdweb-dev/sdk"; import type { ERC4337EthersSigner } from "@thirdweb-dev/wallets/dist/declarations/src/evm/connectors/smart-wallet/lib/erc4337-signer"; import { ZERO_ADDRESS, type Address } from "thirdweb"; -import type { ContractExtension } from "../../schemas/extension"; +import type { ContractExtension } from "../../schema/extension"; +import { parseTransactionOverrides } from "../../server/utils/transactionOverrides"; import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; import { insertTransaction } from "../../utils/transaction/insertTransaction"; import type { InsertedTransaction } from "../../utils/transaction/types"; -import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; interface QueueTxParams { // we should move away from Transaction type (v4 SDK) diff --git a/src/shared/db/wallets/createWalletDetails.ts b/src/db/wallets/createWalletDetails.ts similarity index 98% rename from src/shared/db/wallets/createWalletDetails.ts rename to src/db/wallets/createWalletDetails.ts index 2dbb2f242..13f89c41a 100644 --- a/src/shared/db/wallets/createWalletDetails.ts +++ b/src/db/wallets/createWalletDetails.ts @@ -1,5 +1,5 @@ import type { Address } from "thirdweb"; -import type { PrismaTransaction } from "../../schemas/prisma"; +import type { PrismaTransaction } from "../../schema/prisma"; import { encrypt } from "../../utils/crypto"; import { getPrismaWithPostgresTx } from "../client"; diff --git a/src/shared/db/wallets/deleteWalletDetails.ts b/src/db/wallets/deleteWalletDetails.ts similarity index 100% rename from src/shared/db/wallets/deleteWalletDetails.ts rename to src/db/wallets/deleteWalletDetails.ts diff --git a/src/shared/db/wallets/getAllWallets.ts b/src/db/wallets/getAllWallets.ts similarity index 86% rename from src/shared/db/wallets/getAllWallets.ts rename to src/db/wallets/getAllWallets.ts index 5f0603e81..fd8ef80a0 100644 --- a/src/shared/db/wallets/getAllWallets.ts +++ b/src/db/wallets/getAllWallets.ts @@ -1,4 +1,4 @@ -import { PrismaTransaction } from "../../schemas/prisma"; +import { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetAllWalletsParams { diff --git a/src/shared/db/wallets/getWalletDetails.ts b/src/db/wallets/getWalletDetails.ts similarity index 99% rename from src/shared/db/wallets/getWalletDetails.ts rename to src/db/wallets/getWalletDetails.ts index fcbc8e9d6..fcc8db3f5 100644 --- a/src/shared/db/wallets/getWalletDetails.ts +++ b/src/db/wallets/getWalletDetails.ts @@ -1,6 +1,6 @@ import { getAddress } from "thirdweb"; import { z } from "zod"; -import type { PrismaTransaction } from "../../schemas/prisma"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getConfig } from "../../utils/cache/getConfig"; import { decrypt } from "../../utils/crypto"; import { env } from "../../utils/env"; diff --git a/src/shared/db/wallets/nonceMap.ts b/src/db/wallets/nonceMap.ts similarity index 98% rename from src/shared/db/wallets/nonceMap.ts rename to src/db/wallets/nonceMap.ts index aac67c2be..868b00dcc 100644 --- a/src/shared/db/wallets/nonceMap.ts +++ b/src/db/wallets/nonceMap.ts @@ -1,4 +1,4 @@ -import type { Address } from "thirdweb"; +import { Address } from "thirdweb"; import { env } from "../../utils/env"; import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; diff --git a/src/shared/db/wallets/updateWalletDetails.ts b/src/db/wallets/updateWalletDetails.ts similarity index 100% rename from src/shared/db/wallets/updateWalletDetails.ts rename to src/db/wallets/updateWalletDetails.ts diff --git a/src/shared/db/wallets/walletNonce.ts b/src/db/wallets/walletNonce.ts similarity index 100% rename from src/shared/db/wallets/walletNonce.ts rename to src/db/wallets/walletNonce.ts diff --git a/src/shared/db/webhooks/createWebhook.ts b/src/db/webhooks/createWebhook.ts similarity index 91% rename from src/shared/db/webhooks/createWebhook.ts rename to src/db/webhooks/createWebhook.ts index 7c32a5f13..8e8bb66d7 100644 --- a/src/shared/db/webhooks/createWebhook.ts +++ b/src/db/webhooks/createWebhook.ts @@ -1,6 +1,6 @@ import { Webhooks } from "@prisma/client"; import { createHash, randomBytes } from "crypto"; -import { WebhooksEventTypes } from "../../schemas/webhooks"; +import { WebhooksEventTypes } from "../../schema/webhooks"; import { prisma } from "../client"; interface CreateWebhooksParams { diff --git a/src/shared/db/webhooks/getAllWebhooks.ts b/src/db/webhooks/getAllWebhooks.ts similarity index 100% rename from src/shared/db/webhooks/getAllWebhooks.ts rename to src/db/webhooks/getAllWebhooks.ts diff --git a/src/shared/db/webhooks/getWebhook.ts b/src/db/webhooks/getWebhook.ts similarity index 100% rename from src/shared/db/webhooks/getWebhook.ts rename to src/db/webhooks/getWebhook.ts diff --git a/src/shared/db/webhooks/revokeWebhook.ts b/src/db/webhooks/revokeWebhook.ts similarity index 100% rename from src/shared/db/webhooks/revokeWebhook.ts rename to src/db/webhooks/revokeWebhook.ts diff --git a/src/index.ts b/src/index.ts index ba0d72ebb..764540ee4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,8 @@ import "./polyfill"; -import "./tracer"; - import { initServer } from "./server"; -import { env } from "./shared/utils/env"; -import { logger } from "./shared/utils/logger"; +import { env } from "./utils/env"; +import { logger } from "./utils/logger"; +import "./utils/tracer"; import { initWorker } from "./worker"; import { CancelRecycledNoncesQueue } from "./worker/queues/cancelRecycledNoncesQueue"; import { MigratePostgresTransactionsQueue } from "./worker/queues/migratePostgresTransactionsQueue"; diff --git a/src/shared/lib/cache/swr.ts b/src/lib/cache/swr.ts similarity index 100% rename from src/shared/lib/cache/swr.ts rename to src/lib/cache/swr.ts diff --git a/src/shared/lib/chain/chain-capabilities.ts b/src/lib/chain/chain-capabilities.ts similarity index 100% rename from src/shared/lib/chain/chain-capabilities.ts rename to src/lib/chain/chain-capabilities.ts diff --git a/src/shared/lib/transaction/get-transaction-receipt.ts b/src/lib/transaction/get-transaction-receipt.ts similarity index 100% rename from src/shared/lib/transaction/get-transaction-receipt.ts rename to src/lib/transaction/get-transaction-receipt.ts diff --git a/src/polyfill.ts b/src/polyfill.ts index 029207c32..103de544e 100644 --- a/src/polyfill.ts +++ b/src/polyfill.ts @@ -1,4 +1,4 @@ -import * as crypto from "node:crypto"; +import * as crypto from "crypto"; if (typeof globalThis.crypto === "undefined") { (globalThis as any).crypto = crypto; diff --git a/src/shared/schemas/config.ts b/src/schema/config.ts similarity index 100% rename from src/shared/schemas/config.ts rename to src/schema/config.ts diff --git a/src/shared/schemas/extension.ts b/src/schema/extension.ts similarity index 100% rename from src/shared/schemas/extension.ts rename to src/schema/extension.ts diff --git a/src/shared/schemas/prisma.ts b/src/schema/prisma.ts similarity index 100% rename from src/shared/schemas/prisma.ts rename to src/schema/prisma.ts diff --git a/src/shared/schemas/wallet.ts b/src/schema/wallet.ts similarity index 100% rename from src/shared/schemas/wallet.ts rename to src/schema/wallet.ts diff --git a/src/shared/schemas/webhooks.ts b/src/schema/webhooks.ts similarity index 100% rename from src/shared/schemas/webhooks.ts rename to src/schema/webhooks.ts diff --git a/scripts/apply-migrations.ts b/src/scripts/apply-migrations.ts similarity index 88% rename from scripts/apply-migrations.ts rename to src/scripts/apply-migrations.ts index 12b16ff3b..cda3af90c 100644 --- a/scripts/apply-migrations.ts +++ b/src/scripts/apply-migrations.ts @@ -1,10 +1,6 @@ -import { logger } from "../src/shared/utils/logger"; -import { - acquireLock, - releaseLock, - waitForLock, -} from "../src/shared/utils/redis/lock"; -import { redis } from "../src/shared/utils/redis/redis"; +import { logger } from "../utils/logger"; +import { acquireLock, releaseLock, waitForLock } from "../utils/redis/lock"; +import { redis } from "../utils/redis/redis"; const MIGRATION_LOCK_TTL_SECONDS = 60; diff --git a/scripts/generate-sdk.ts b/src/scripts/generate-sdk.ts similarity index 100% rename from scripts/generate-sdk.ts rename to src/scripts/generate-sdk.ts diff --git a/scripts/setup-db.ts b/src/scripts/setup-db.ts similarity index 79% rename from scripts/setup-db.ts rename to src/scripts/setup-db.ts index fa6dad550..80d992fd9 100644 --- a/scripts/setup-db.ts +++ b/src/scripts/setup-db.ts @@ -1,5 +1,5 @@ -import { execSync } from "node:child_process"; -import { prisma } from "../src/shared/db/client"; +import { execSync } from "child_process"; +import { prisma } from "../db/client"; const main = async () => { const [{ exists: hasWalletsTable }]: [{ exists: boolean }] = @@ -14,8 +14,8 @@ const main = async () => { const schema = process.env.NODE_ENV === "production" - ? "./dist/prisma/schema.prisma" - : "./src/prisma/schema.prisma"; + ? `./dist/prisma/schema.prisma` + : `./src/prisma/schema.prisma`; if (hasWalletsTable) { execSync(`yarn prisma migrate reset --force --schema ${schema}`, { diff --git a/src/server/index.ts b/src/server/index.ts index a0a576dfc..4b6deb374 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -3,11 +3,11 @@ import fastify, { type FastifyInstance } from "fastify"; import * as fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; -import { clearCacheCron } from "../shared/utils/cron/clearCacheCron"; -import { env } from "../shared/utils/env"; -import { logger } from "../shared/utils/logger"; -import { metricsServer } from "../shared/utils/prometheus"; -import { withServerUsageReporting } from "../shared/utils/usage"; +import { clearCacheCron } from "../utils/cron/clearCacheCron"; +import { env } from "../utils/env"; +import { logger } from "../utils/logger"; +import { metricsServer } from "../utils/prometheus"; +import { withServerUsageReporting } from "../utils/usage"; import { updateTxListener } from "./listeners/updateTxListener"; import { withAdminRoutes } from "./middleware/adminRoutes"; import { withAuth } from "./middleware/auth"; diff --git a/src/server/listeners/updateTxListener.ts b/src/server/listeners/updateTxListener.ts index 150a41650..d8ff01ebf 100644 --- a/src/server/listeners/updateTxListener.ts +++ b/src/server/listeners/updateTxListener.ts @@ -1,6 +1,6 @@ -import { knex } from "../../shared/db/client"; -import { TransactionDB } from "../../shared/db/transactions/db"; -import { logger } from "../../shared/utils/logger"; +import { knex } from "../../db/client"; +import { TransactionDB } from "../../db/transactions/db"; +import { logger } from "../../utils/logger"; import { toTransactionSchema } from "../schemas/transaction"; import { subscriptionsData } from "../schemas/websocket"; import { diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/adminRoutes.ts index 297330a13..1dac982df 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/adminRoutes.ts @@ -5,7 +5,7 @@ import type { Queue } from "bullmq"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { timingSafeEqual } from "node:crypto"; -import { env } from "../../shared/utils/env"; +import { env } from "../../utils/env"; import { CancelRecycledNoncesQueue } from "../../worker/queues/cancelRecycledNoncesQueue"; import { MigratePostgresTransactionsQueue } from "../../worker/queues/migratePostgresTransactionsQueue"; import { MineTransactionQueue } from "../../worker/queues/mineTransactionQueue"; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 022519a41..19883aa98 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -5,25 +5,25 @@ import { type ThirdwebAuthUser, } from "@thirdweb-dev/auth/fastify"; import { AsyncWallet } from "@thirdweb-dev/wallets/evm/wallets/async"; -import { createHash } from "node:crypto"; +import { createHash } from "crypto"; 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 { WebhooksEventTypes } from "../../shared/schemas/webhooks"; -import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../../shared/utils/auth"; -import { getAccessToken } from "../../shared/utils/cache/accessToken"; -import { getAuthWallet } from "../../shared/utils/cache/authWallet"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; -import { getKeypair } from "../../shared/utils/cache/keypair"; -import { env } from "../../shared/utils/env"; -import { logger } from "../../shared/utils/logger"; -import { sendWebhookRequest } from "../../shared/utils/webhook"; -import { Permission } from "../../shared/schemas/auth"; +import { getPermissions } from "../../db/permissions/getPermissions"; +import { createToken } from "../../db/tokens/createToken"; +import { revokeToken } from "../../db/tokens/revokeToken"; +import { WebhooksEventTypes } from "../../schema/webhooks"; +import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../../utils/auth"; +import { getAccessToken } from "../../utils/cache/accessToken"; +import { getAuthWallet } from "../../utils/cache/authWallet"; +import { getConfig } from "../../utils/cache/getConfig"; +import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; +import { getKeypair } from "../../utils/cache/keypair"; +import { env } from "../../utils/env"; +import { logger } from "../../utils/logger"; +import { sendWebhookRequest } from "../../utils/webhook"; +import { Permission } from "../schemas/auth"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/cors.ts b/src/server/middleware/cors.ts index da81b02fa..ce9997a52 100644 --- a/src/server/middleware/cors.ts +++ b/src/server/middleware/cors.ts @@ -1,5 +1,5 @@ import type { FastifyInstance } from "fastify"; -import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getConfig } from "../../utils/cache/getConfig"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; const STANDARD_METHODS = "GET,POST,DELETE,PUT,PATCH,HEAD,PUT,PATCH,POST,DELETE"; diff --git a/src/server/middleware/engineMode.ts b/src/server/middleware/engineMode.ts index 9abd2c220..c111c5fdd 100644 --- a/src/server/middleware/engineMode.ts +++ b/src/server/middleware/engineMode.ts @@ -1,5 +1,5 @@ import type { FastifyInstance } from "fastify"; -import { env } from "../../shared/utils/env"; +import { env } from "../../utils/env"; export function withEnforceEngineMode(server: FastifyInstance) { if (env.ENGINE_MODE === "sandbox") { diff --git a/src/server/middleware/error.ts b/src/server/middleware/error.ts index f993750f9..5b321cbfd 100644 --- a/src/server/middleware/error.ts +++ b/src/server/middleware/error.ts @@ -1,8 +1,8 @@ import type { FastifyInstance } from "fastify"; import { ReasonPhrases, StatusCodes } from "http-status-codes"; import { ZodError } from "zod"; -import { env } from "../../shared/utils/env"; -import { parseEthersError } from "../../shared/utils/ethers"; +import { env } from "../../utils/env"; +import { parseEthersError } from "../../utils/ethers"; export type CustomError = { message: string; diff --git a/src/server/middleware/logs.ts b/src/server/middleware/logs.ts index 3ba0cfaf7..e5ed3a6b5 100644 --- a/src/server/middleware/logs.ts +++ b/src/server/middleware/logs.ts @@ -1,6 +1,6 @@ import type { FastifyInstance } from "fastify"; import { stringify } from "thirdweb/utils"; -import { logger } from "../../shared/utils/logger"; +import { logger } from "../../utils/logger"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/prometheus.ts b/src/server/middleware/prometheus.ts index 29a54b252..64bae9d49 100644 --- a/src/server/middleware/prometheus.ts +++ b/src/server/middleware/prometheus.ts @@ -1,6 +1,6 @@ import type { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; -import { env } from "../../shared/utils/env"; -import { recordMetrics } from "../../shared/utils/prometheus"; +import { env } from "../../utils/env"; +import { recordMetrics } from "../../utils/prometheus"; export function withPrometheus(server: FastifyInstance) { if (!env.METRICS_ENABLED) { diff --git a/src/server/middleware/rateLimit.ts b/src/server/middleware/rateLimit.ts index 96911855a..97c3f72cd 100644 --- a/src/server/middleware/rateLimit.ts +++ b/src/server/middleware/rateLimit.ts @@ -1,7 +1,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../shared/utils/env"; -import { redis } from "../../shared/utils/redis/redis"; +import { env } from "../../utils/env"; +import { redis } from "../../utils/redis/redis"; import { createCustomError } from "./error"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/websocket.ts b/src/server/middleware/websocket.ts index b84363dd3..6c7ebceef 100644 --- a/src/server/middleware/websocket.ts +++ b/src/server/middleware/websocket.ts @@ -1,6 +1,6 @@ import WebSocketPlugin from "@fastify/websocket"; import type { FastifyInstance } from "fastify"; -import { logger } from "../../shared/utils/logger"; +import { logger } from "../../utils/logger"; export async function withWebSocket(server: FastifyInstance) { await server.register(WebSocketPlugin, { diff --git a/src/server/routes/admin/nonces.ts b/src/server/routes/admin/nonces.ts index 75e109405..2a2f528d3 100644 --- a/src/server/routes/admin/nonces.ts +++ b/src/server/routes/admin/nonces.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { - type Address, + Address, eth_getTransactionCount, getAddress, getRpcClient, @@ -12,10 +12,10 @@ import { lastUsedNonceKey, recycledNoncesKey, sentNoncesKey, -} from "../../../shared/db/wallets/walletNonce"; -import { getChain } from "../../../shared/utils/chain"; -import { redis } from "../../../shared/utils/redis/redis"; -import { thirdwebClient } from "../../../shared/utils/sdk"; +} from "../../../db/wallets/walletNonce"; +import { getChain } from "../../../utils/chain"; +import { redis } from "../../../utils/redis/redis"; +import { thirdwebClient } from "../../../utils/sdk"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/admin/transaction.ts b/src/server/routes/admin/transaction.ts index d8eace0b7..5827e5d24 100644 --- a/src/server/routes/admin/transaction.ts +++ b/src/server/routes/admin/transaction.ts @@ -1,12 +1,12 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { Queue } from "bullmq"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { Queue } from "bullmq"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { stringify } from "thirdweb/utils"; -import { TransactionDB } from "../../../shared/db/transactions/db"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; -import { maybeDate } from "../../../shared/utils/primitiveTypes"; -import { redis } from "../../../shared/utils/redis/redis"; +import { TransactionDB } from "../../../db/transactions/db"; +import { getConfig } from "../../../utils/cache/getConfig"; +import { maybeDate } from "../../../utils/primitiveTypes"; +import { redis } from "../../../utils/redis/redis"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/auth/access-tokens/create.ts b/src/server/routes/auth/access-tokens/create.ts index b69b6cf20..9c33113cd 100644 --- a/src/server/routes/auth/access-tokens/create.ts +++ b/src/server/routes/auth/access-tokens/create.ts @@ -3,11 +3,11 @@ 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 { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; -import { env } from "../../../../shared/utils/env"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { createToken } from "../../../../db/tokens/createToken"; +import { accessTokenCache } from "../../../../utils/cache/accessToken"; +import { getConfig } from "../../../../utils/cache/getConfig"; +import { env } from "../../../../utils/env"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { AccessTokenSchema } from "./getAll"; diff --git a/src/server/routes/auth/access-tokens/getAll.ts b/src/server/routes/auth/access-tokens/getAll.ts index 9cbe3646b..181f35ec8 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 "../../../../db/tokens/getAccessTokens"; 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..2d509bb65 100644 --- a/src/server/routes/auth/access-tokens/revoke.ts +++ b/src/server/routes/auth/access-tokens/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 { revokeToken } from "../../../../shared/db/tokens/revokeToken"; -import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; +import { revokeToken } from "../../../../db/tokens/revokeToken"; +import { accessTokenCache } from "../../../../utils/cache/accessToken"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/access-tokens/update.ts b/src/server/routes/auth/access-tokens/update.ts index f09b5ce5f..a5d730fdb 100644 --- a/src/server/routes/auth/access-tokens/update.ts +++ b/src/server/routes/auth/access-tokens/update.ts @@ -1,8 +1,8 @@ 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 { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; +import { updateToken } from "../../../../db/tokens/updateToken"; +import { accessTokenCache } from "../../../../utils/cache/accessToken"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/add.ts b/src/server/routes/auth/keypair/add.ts index 2aab345ba..3ecc24364 100644 --- a/src/server/routes/auth/keypair/add.ts +++ b/src/server/routes/auth/keypair/add.ts @@ -1,15 +1,15 @@ -import { type Keypairs, Prisma } from "@prisma/client"; -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Keypairs, Prisma } from "@prisma/client"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { insertKeypair } from "../../../../shared/db/keypair/insert"; -import { isWellFormedPublicKey } from "../../../../shared/utils/crypto"; +import { insertKeypair } from "../../../../db/keypair/insert"; +import { isWellFormedPublicKey } from "../../../../utils/crypto"; import { createCustomError } from "../../../middleware/error"; import { KeypairAlgorithmSchema, KeypairSchema, toKeypairSchema, -} from "../../../../shared/schemas/keypair"; +} from "../../../schemas/keypairs"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/list.ts b/src/server/routes/auth/keypair/list.ts index 81fab4e68..8c4395f0e 100644 --- a/src/server/routes/auth/keypair/list.ts +++ b/src/server/routes/auth/keypair/list.ts @@ -1,11 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { listKeypairs } from "../../../../shared/db/keypair/list"; -import { - KeypairSchema, - toKeypairSchema, -} from "../../../../shared/schemas/keypair"; +import { listKeypairs } from "../../../../db/keypair/list"; +import { KeypairSchema, toKeypairSchema } from "../../../schemas/keypairs"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/remove.ts b/src/server/routes/auth/keypair/remove.ts index 6cc65f2ff..939979d52 100644 --- a/src/server/routes/auth/keypair/remove.ts +++ b/src/server/routes/auth/keypair/remove.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { deleteKeypair } from "../../../../shared/db/keypair/delete"; -import { keypairCache } from "../../../../shared/utils/cache/keypair"; +import { deleteKeypair } from "../../../../db/keypair/delete"; +import { keypairCache } from "../../../../utils/cache/keypair"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/permissions/getAll.ts b/src/server/routes/auth/permissions/getAll.ts index 22e4b1478..7a4f5d4a4 100644 --- a/src/server/routes/auth/permissions/getAll.ts +++ b/src/server/routes/auth/permissions/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 { prisma } from "../../../../shared/db/client"; +import { prisma } from "../../../../db/client"; import { AddressSchema } from "../../../schemas/address"; 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..6f9ef49ee 100644 --- a/src/server/routes/auth/permissions/grant.ts +++ b/src/server/routes/auth/permissions/grant.ts @@ -1,9 +1,9 @@ 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 "../../../../db/permissions/updatePermissions"; import { AddressSchema } from "../../../schemas/address"; -import { permissionsSchema } from "../../../../shared/schemas/auth"; +import { permissionsSchema } from "../../../schemas/auth"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/permissions/revoke.ts b/src/server/routes/auth/permissions/revoke.ts index 6e72d7364..08f1609bb 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 "../../../../db/permissions/deletePermissions"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/cancel-nonces.ts b/src/server/routes/backend-wallet/cancel-nonces.ts index 47803817c..cb4f6cf73 100644 --- a/src/server/routes/backend-wallet/cancel-nonces.ts +++ b/src/server/routes/backend-wallet/cancel-nonces.ts @@ -3,9 +3,9 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_getTransactionCount, getRpcClient } from "thirdweb"; import { checksumAddress } from "thirdweb/utils"; -import { getChain } from "../../../shared/utils/chain"; -import { thirdwebClient } from "../../../shared/utils/sdk"; -import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancelTransaction"; +import { getChain } from "../../../utils/chain"; +import { thirdwebClient } from "../../../utils/sdk"; +import { sendCancellationTransaction } from "../../../utils/transaction/cancelTransaction"; import { requestQuerystringSchema, standardResponseSchema, diff --git a/src/server/routes/backend-wallet/create.ts b/src/server/routes/backend-wallet/create.ts index 64162c5d0..c25ff560c 100644 --- a/src/server/routes/backend-wallet/create.ts +++ b/src/server/routes/backend-wallet/create.ts @@ -6,8 +6,8 @@ import { DEFAULT_ACCOUNT_FACTORY_V0_7, ENTRYPOINT_ADDRESS_v0_7, } from "thirdweb/wallets/smart"; -import { WalletType } from "../../../shared/schemas/wallet"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { WalletType } from "../../../schema/wallet"; +import { getConfig } from "../../../utils/cache/getConfig"; import { createCustomError } from "../../middleware/error"; 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..a9a9b1a48 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 "../../../db/wallets/getAllWallets"; import { standardResponseSchema, walletDetailsSchema, diff --git a/src/server/routes/backend-wallet/getBalance.ts b/src/server/routes/backend-wallet/getBalance.ts index 01f262991..45a9987af 100644 --- a/src/server/routes/backend-wallet/getBalance.ts +++ b/src/server/routes/backend-wallet/getBalance.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getSdk } from "../../../shared/utils/cache/getSdk"; +import { getSdk } from "../../../utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { currencyValueSchema, diff --git a/src/server/routes/backend-wallet/getNonce.ts b/src/server/routes/backend-wallet/getNonce.ts index f5ef87ac3..593cc9ed9 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 "../../../db/wallets/walletNonce"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; diff --git a/src/server/routes/backend-wallet/getTransactions.ts b/src/server/routes/backend-wallet/getTransactions.ts index 24a215697..5e8dcf89e 100644 --- a/src/server/routes/backend-wallet/getTransactions.ts +++ b/src/server/routes/backend-wallet/getTransactions.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAddress } from "thirdweb"; -import { TransactionDB } from "../../../shared/db/transactions/db"; +import { TransactionDB } from "../../../db/transactions/db"; import { PaginationSchema } from "../../schemas/pagination"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/backend-wallet/getTransactionsByNonce.ts b/src/server/routes/backend-wallet/getTransactionsByNonce.ts index 0be1571d3..b804df6aa 100644 --- a/src/server/routes/backend-wallet/getTransactionsByNonce.ts +++ b/src/server/routes/backend-wallet/getTransactionsByNonce.ts @@ -1,10 +1,10 @@ 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 { normalizeAddress } from "../../../shared/utils/primitiveTypes"; -import type { AnyTransaction } from "../../../shared/utils/transaction/types"; +import { TransactionDB } from "../../../db/transactions/db"; +import { getNonceMap } from "../../../db/wallets/nonceMap"; +import { normalizeAddress } from "../../../utils/primitiveTypes"; +import type { AnyTransaction } from "../../../utils/transaction/types"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { TransactionSchema, diff --git a/src/server/routes/backend-wallet/import.ts b/src/server/routes/backend-wallet/import.ts index 88a93d48b..510059a14 100644 --- a/src/server/routes/backend-wallet/import.ts +++ b/src/server/routes/backend-wallet/import.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../utils/cache/getConfig"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; 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..431c118d8 100644 --- a/src/server/routes/backend-wallet/remove.ts +++ b/src/server/routes/backend-wallet/remove.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { deleteWalletDetails } from "../../../shared/db/wallets/deleteWalletDetails"; +import { Address } from "thirdweb"; +import { deleteWalletDetails } from "../../../db/wallets/deleteWalletDetails"; 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..0ec4c30e8 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 "../../../db/wallets/walletNonce"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/sendTransaction.ts b/src/server/routes/backend-wallet/sendTransaction.ts index d23add987..bb29f9386 100644 --- a/src/server/routes/backend-wallet/sendTransaction.ts +++ b/src/server/routes/backend-wallet/sendTransaction.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, Hex } from "thirdweb"; -import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../utils/transaction/insertTransaction"; import { AddressSchema } from "../../schemas/address"; import { requestQuerystringSchema, diff --git a/src/server/routes/backend-wallet/sendTransactionBatch.ts b/src/server/routes/backend-wallet/sendTransactionBatch.ts index d887e9bed..3d69c4431 100644 --- a/src/server/routes/backend-wallet/sendTransactionBatch.ts +++ b/src/server/routes/backend-wallet/sendTransactionBatch.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, Hex } from "thirdweb"; -import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../utils/transaction/insertTransaction"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { txOverridesWithValueSchema } from "../../schemas/txOverrides"; diff --git a/src/server/routes/backend-wallet/signMessage.ts b/src/server/routes/backend-wallet/signMessage.ts index 45f9cb69d..ac810a795 100644 --- a/src/server/routes/backend-wallet/signMessage.ts +++ b/src/server/routes/backend-wallet/signMessage.ts @@ -6,9 +6,9 @@ import { arbitrumSepolia } from "thirdweb/chains"; import { getWalletDetails, isSmartBackendWallet, -} from "../../../shared/db/wallets/getWalletDetails"; -import { walletDetailsToAccount } from "../../../shared/utils/account"; -import { getChain } from "../../../shared/utils/chain"; +} from "../../../db/wallets/getWalletDetails"; +import { walletDetailsToAccount } from "../../../utils/account"; +import { getChain } from "../../../utils/chain"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/signTransaction.ts b/src/server/routes/backend-wallet/signTransaction.ts index 7af06715e..c6a73c2c2 100644 --- a/src/server/routes/backend-wallet/signTransaction.ts +++ b/src/server/routes/backend-wallet/signTransaction.ts @@ -2,13 +2,13 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Hex } from "thirdweb"; -import { getAccount } from "../../../shared/utils/account"; +import { getAccount } from "../../../utils/account"; import { getChecksumAddress, maybeBigInt, maybeInt, -} from "../../../shared/utils/primitiveTypes"; -import { toTransactionType } from "../../../shared/utils/sdk"; +} from "../../../utils/primitiveTypes"; +import { toTransactionType } from "../../../utils/sdk"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/signTypedData.ts b/src/server/routes/backend-wallet/signTypedData.ts index 6033e309b..6c4705eea 100644 --- a/src/server/routes/backend-wallet/signTypedData.ts +++ b/src/server/routes/backend-wallet/signTypedData.ts @@ -1,8 +1,8 @@ import type { TypedDataSigner } from "@ethersproject/abstract-signer"; -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getWallet } from "../../../shared/utils/cache/getWallet"; +import { getWallet } from "../../../utils/cache/getWallet"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/simulateTransaction.ts b/src/server/routes/backend-wallet/simulateTransaction.ts index eec049d0f..e30e5d662 100644 --- a/src/server/routes/backend-wallet/simulateTransaction.ts +++ b/src/server/routes/backend-wallet/simulateTransaction.ts @@ -3,8 +3,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; import type { Address, Hex } from "thirdweb"; -import { doSimulateTransaction } from "../../../shared/utils/transaction/simulateQueuedTransaction"; -import type { QueuedTransaction } from "../../../shared/utils/transaction/types"; +import { doSimulateTransaction } from "../../../utils/transaction/simulateQueuedTransaction"; +import type { QueuedTransaction } from "../../../utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; import { diff --git a/src/server/routes/backend-wallet/transfer.ts b/src/server/routes/backend-wallet/transfer.ts index 98a1f6fb4..d45b6cd28 100644 --- a/src/server/routes/backend-wallet/transfer.ts +++ b/src/server/routes/backend-wallet/transfer.ts @@ -10,11 +10,11 @@ import { } from "thirdweb"; import { transfer as transferERC20 } from "thirdweb/extensions/erc20"; import { isContractDeployed, resolvePromisedValue } from "thirdweb/utils"; -import { getChain } from "../../../shared/utils/chain"; -import { normalizeAddress } from "../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../shared/utils/sdk"; -import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; -import type { InsertedTransaction } from "../../../shared/utils/transaction/types"; +import { getChain } from "../../../utils/chain"; +import { normalizeAddress } from "../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../utils/sdk"; +import { insertTransaction } from "../../../utils/transaction/insertTransaction"; +import type { InsertedTransaction } from "../../../utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; import { TokenAmountStringSchema } from "../../schemas/number"; diff --git a/src/server/routes/backend-wallet/update.ts b/src/server/routes/backend-wallet/update.ts index 8baabfacf..5c916d8d8 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 { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateWalletDetails } from "../../../shared/db/wallets/updateWalletDetails"; +import { updateWalletDetails } from "../../../db/wallets/updateWalletDetails"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/withdraw.ts b/src/server/routes/backend-wallet/withdraw.ts index 0cfe6fe36..e7815ac72 100644 --- a/src/server/routes/backend-wallet/withdraw.ts +++ b/src/server/routes/backend-wallet/withdraw.ts @@ -9,12 +9,12 @@ import { } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { getWalletBalance } from "thirdweb/wallets"; -import { getAccount } from "../../../shared/utils/account"; -import { getChain } from "../../../shared/utils/chain"; -import { logger } from "../../../shared/utils/logger"; -import { getChecksumAddress } from "../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../shared/utils/sdk"; -import type { PopulatedTransaction } from "../../../shared/utils/transaction/types"; +import { getAccount } from "../../../utils/account"; +import { getChain } from "../../../utils/chain"; +import { logger } from "../../../utils/logger"; +import { getChecksumAddress } from "../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../utils/sdk"; +import type { PopulatedTransaction } from "../../../utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../schemas/address"; import { TokenAmountStringSchema } from "../../schemas/number"; diff --git a/src/server/routes/chain/get.ts b/src/server/routes/chain/get.ts index c271613a3..b01c90bed 100644 --- a/src/server/routes/chain/get.ts +++ b/src/server/routes/chain/get.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getChainMetadata } from "thirdweb/chains"; -import { getChain } from "../../../shared/utils/chain"; +import { getChain } from "../../../utils/chain"; import { chainRequestQuerystringSchema, chainResponseSchema, diff --git a/src/server/routes/chain/getAll.ts b/src/server/routes/chain/getAll.ts index c5644f337..e1b85cf0d 100644 --- a/src/server/routes/chain/getAll.ts +++ b/src/server/routes/chain/getAll.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { fetchChains } from "@thirdweb-dev/chains"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../utils/cache/getConfig"; import { chainResponseSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/auth/get.ts b/src/server/routes/configuration/auth/get.ts index 23163fa35..9f8bc0f32 100644 --- a/src/server/routes/configuration/auth/get.ts +++ b/src/server/routes/configuration/auth/get.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/auth/update.ts b/src/server/routes/configuration/auth/update.ts index 07ab148b3..411dd683f 100644 --- a/src/server/routes/configuration/auth/update.ts +++ b/src/server/routes/configuration/auth/update.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/backend-wallet-balance/get.ts b/src/server/routes/configuration/backend-wallet-balance/get.ts index ab430ecc4..1fce8a8ee 100644 --- a/src/server/routes/configuration/backend-wallet-balance/get.ts +++ b/src/server/routes/configuration/backend-wallet-balance/get.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/backend-wallet-balance/update.ts b/src/server/routes/configuration/backend-wallet-balance/update.ts index e47a75af6..edb386e9d 100644 --- a/src/server/routes/configuration/backend-wallet-balance/update.ts +++ b/src/server/routes/configuration/backend-wallet-balance/update.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { WeiAmountStringSchema } from "../../../schemas/number"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cache/get.ts b/src/server/routes/configuration/cache/get.ts index 5ff178bd0..2d4542585 100644 --- a/src/server/routes/configuration/cache/get.ts +++ b/src/server/routes/configuration/cache/get.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/cache/update.ts b/src/server/routes/configuration/cache/update.ts index a87ef1546..96d34db0b 100644 --- a/src/server/routes/configuration/cache/update.ts +++ b/src/server/routes/configuration/cache/update.ts @@ -1,10 +1,10 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; -import { clearCacheCron } from "../../../../shared/utils/cron/clearCacheCron"; -import { isValidCron } from "../../../../shared/utils/cron/isValidCron"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; +import { clearCacheCron } from "../../../../utils/cron/clearCacheCron"; +import { isValidCron } from "../../../../utils/cron/isValidCron"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/chains/get.ts b/src/server/routes/configuration/chains/get.ts index 6b38f9139..588927206 100644 --- a/src/server/routes/configuration/chains/get.ts +++ b/src/server/routes/configuration/chains/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { chainResponseSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/chains/update.ts b/src/server/routes/configuration/chains/update.ts index 589eb0797..5ae3ed225 100644 --- a/src/server/routes/configuration/chains/update.ts +++ b/src/server/routes/configuration/chains/update.ts @@ -1,9 +1,9 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; -import { sdkCache } from "../../../../shared/utils/cache/getSdk"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; +import { sdkCache } from "../../../../utils/cache/getSdk"; import { chainResponseSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/contract-subscriptions/get.ts b/src/server/routes/configuration/contract-subscriptions/get.ts index ae6dc97dc..36d42d582 100644 --- a/src/server/routes/configuration/contract-subscriptions/get.ts +++ b/src/server/routes/configuration/contract-subscriptions/get.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { contractSubscriptionConfigurationSchema, standardResponseSchema, diff --git a/src/server/routes/configuration/contract-subscriptions/update.ts b/src/server/routes/configuration/contract-subscriptions/update.ts index fdc0897d0..501ce8b4b 100644 --- a/src/server/routes/configuration/contract-subscriptions/update.ts +++ b/src/server/routes/configuration/contract-subscriptions/update.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { contractSubscriptionConfigurationSchema, diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index 24d085d07..aace6cb26 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cors/get.ts b/src/server/routes/configuration/cors/get.ts index f5cbab52b..37a1aa9bb 100644 --- a/src/server/routes/configuration/cors/get.ts +++ b/src/server/routes/configuration/cors/get.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../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..d32a819ef 100644 --- a/src/server/routes/configuration/cors/remove.ts +++ b/src/server/routes/configuration/cors/remove.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index a1a7540bc..54ddf3e84 100644 --- a/src/server/routes/configuration/cors/set.ts +++ b/src/server/routes/configuration/cors/set.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/ip/get.ts b/src/server/routes/configuration/ip/get.ts index 1f916c14f..99250011e 100644 --- a/src/server/routes/configuration/ip/get.ts +++ b/src/server/routes/configuration/ip/get.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/ip/set.ts b/src/server/routes/configuration/ip/set.ts index 8dab64868..e92a319ce 100644 --- a/src/server/routes/configuration/ip/set.ts +++ b/src/server/routes/configuration/ip/set.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/transactions/get.ts b/src/server/routes/configuration/transactions/get.ts index c1d95ff5e..33cdfeac3 100644 --- a/src/server/routes/configuration/transactions/get.ts +++ b/src/server/routes/configuration/transactions/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/transactions/update.ts b/src/server/routes/configuration/transactions/update.ts index c5322dca4..c94db43ce 100644 --- a/src/server/routes/configuration/transactions/update.ts +++ b/src/server/routes/configuration/transactions/update.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Partial( diff --git a/src/server/routes/configuration/wallets/get.ts b/src/server/routes/configuration/wallets/get.ts index eded75a5e..d170cbea5 100644 --- a/src/server/routes/configuration/wallets/get.ts +++ b/src/server/routes/configuration/wallets/get.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { WalletType } from "../../../../shared/schemas/wallet"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { WalletType } from "../../../../schema/wallet"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/wallets/update.ts b/src/server/routes/configuration/wallets/update.ts index 9b79e6146..d21182227 100644 --- a/src/server/routes/configuration/wallets/update.ts +++ b/src/server/routes/configuration/wallets/update.ts @@ -1,9 +1,9 @@ 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 { WalletType } from "../../../../shared/schemas/wallet"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; +import { WalletType } from "../../../../schema/wallet"; +import { getConfig } from "../../../../utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/contract/events/getAllEvents.ts b/src/server/routes/contract/events/getAllEvents.ts index 5d6150779..a28264b45 100644 --- a/src/server/routes/contract/events/getAllEvents.ts +++ b/src/server/routes/contract/events/getAllEvents.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../utils/cache/getContract"; import { contractEventSchema, eventsQuerystringSchema, diff --git a/src/server/routes/contract/events/getContractEventLogs.ts b/src/server/routes/contract/events/getContractEventLogs.ts index 47a12a269..85e0a0c3c 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 "../../../../db/contractEventLogs/getContractEventLogs"; +import { isContractSubscribed } from "../../../../db/contractSubscriptions/getContractSubscriptions"; 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..2cde46d21 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 "../../../../db/contractEventLogs/getContractEventLogs"; import { AddressSchema } from "../../../schemas/address"; import { eventLogSchema } from "../../../schemas/eventLog"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/contract/events/getEvents.ts b/src/server/routes/contract/events/getEvents.ts index 69cabe01c..f30839eba 100644 --- a/src/server/routes/contract/events/getEvents.ts +++ b/src/server/routes/contract/events/getEvents.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../utils/cache/getContract"; import { contractEventSchema, eventsQuerystringSchema, diff --git a/src/server/routes/contract/events/paginateEventLogs.ts b/src/server/routes/contract/events/paginateEventLogs.ts index 1767a4c07..02a4c5212 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 "../../../../db/configuration/getConfiguration"; +import { getEventLogsByCursor } from "../../../../db/contractEventLogs/getContractEventLogs"; 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/read/getAllAdmins.ts b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts index ea6428780..13d5d38a2 100644 --- a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts +++ b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/account/read/getAllSessions.ts b/src/server/routes/contract/extensions/account/read/getAllSessions.ts index 68db22c51..fd3bd971a 100644 --- a/src/server/routes/contract/extensions/account/read/getAllSessions.ts +++ b/src/server/routes/contract/extensions/account/read/getAllSessions.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/grantAdmin.ts b/src/server/routes/contract/extensions/account/write/grantAdmin.ts index 2a7120ca8..6d5b11e82 100644 --- a/src/server/routes/contract/extensions/account/write/grantAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/grantAdmin.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/grantSession.ts b/src/server/routes/contract/extensions/account/write/grantSession.ts index ab04cfcfa..0e64558d7 100644 --- a/src/server/routes/contract/extensions/account/write/grantSession.ts +++ b/src/server/routes/contract/extensions/account/write/grantSession.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts index 2b19ee104..2e21671aa 100644 --- a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/revokeSession.ts b/src/server/routes/contract/extensions/account/write/revokeSession.ts index 58c74d8c7..f71e40218 100644 --- a/src/server/routes/contract/extensions/account/write/revokeSession.ts +++ b/src/server/routes/contract/extensions/account/write/revokeSession.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/updateSession.ts b/src/server/routes/contract/extensions/account/write/updateSession.ts index daade19b1..46da67695 100644 --- a/src/server/routes/contract/extensions/account/write/updateSession.ts +++ b/src/server/routes/contract/extensions/account/write/updateSession.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts index 7fd003c0d..5a5208679 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts index d3a9020cd..66f1ad35a 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts index bce8ff614..0ccbbde66 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts b/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts index e540a46f0..e4f0089aa 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { predictAddress } from "thirdweb/wallets/smart"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts b/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts index 1eb2a60b4..55f2c34d6 100644 --- a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts +++ b/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { createAccount as factoryCreateAccount } from "thirdweb/extensions/erc4337"; import { isHex, stringToHex } from "thirdweb/utils"; import { predictAddress } from "thirdweb/wallets/smart"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { redis } from "../../../../../../shared/utils/redis/redis"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; +import { redis } from "../../../../../../utils/redis/redis"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { prebuiltDeployResponseSchema } from "../../../../../schemas/prebuilts"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts index 2cfa5c07a..635da28ae 100644 --- a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts index c5bcba524..5b100dd11 100644 --- a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/get.ts b/src/server/routes/contract/extensions/erc1155/read/get.ts index acb439591..c9edfafca 100644 --- a/src/server/routes/contract/extensions/erc1155/read/get.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts index 739707d3c..62f7807b4 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getAll.ts b/src/server/routes/contract/extensions/erc1155/read/getAll.ts index 42b563c1f..8d1018a5b 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc1155/read/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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts index 9003f2db4..5bc021d5d 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts index 8b061be03..d50a6af03 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts index 05e53b95e..59a130fb0 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts index d4a8f08dc..e56383bd0 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts index ac1fac7dd..f97a3089a 100644 --- a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts index ab95c40e3..85e8b8d7b 100644 --- a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts @@ -4,11 +4,11 @@ import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import type { NFTInput } from "thirdweb/dist/types/utils/nft/parseNft"; import { generateMintSignature } from "thirdweb/extensions/erc1155"; -import { getAccount } from "../../../../../../shared/utils/account"; -import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { getAccount } from "../../../../../../utils/account"; +import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; +import { getChain } from "../../../../../../utils/chain"; +import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts index 21b24ad92..ca225d4e9 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts index e1dafd5cf..54de23b04 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts index 5164f0a83..d8e60a5ec 100644 --- a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts +++ b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burn.ts b/src/server/routes/contract/extensions/erc1155/write/burn.ts index d01ea058d..7c1a126df 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burn.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts index a78cb430c..d4dedc504 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts index c716b1f61..39bd1e4a4 100644 --- a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts @@ -1,10 +1,10 @@ -import { type Static, Type } from "@sinclair/typebox"; +import { Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc1155"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; 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..015284d09 100644 --- a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts index 58fa670ab..f48e90bea 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts index e8776756a..1d31b92aa 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts index 776156ca0..0f72457f8 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts index 510469914..db5a05f60 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts index 36e81475b..702c5ae4e 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, type setBatchSantiziedClaimConditionsRequestSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts index 6f3021397..cf014efaf 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts index b1e12fb4b..adc3ed3e8 100644 --- a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts @@ -3,8 +3,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { signature1155OutputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/transfer.ts b/src/server/routes/contract/extensions/erc1155/write/transfer.ts index 61d46227a..4db2395ec 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Hex } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getChain } from "../../../../../../utils/chain"; +import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema, HexSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts index 66229cc15..385857075 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Hex } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getChain } from "../../../../../../utils/chain"; +import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema, HexSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; 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..21bb87a40 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts index 0689517fa..3c020ff24 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts index 8386bc054..128fd9f86 100644 --- a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts index 167ec4cf4..edade3a9f 100644 --- a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/canClaim.ts b/src/server/routes/contract/extensions/erc20/read/canClaim.ts index 078c8d7f2..b38495b17 100644 --- a/src/server/routes/contract/extensions/erc20/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc20/read/canClaim.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/get.ts b/src/server/routes/contract/extensions/erc20/read/get.ts index 88f532f0b..c89338d37 100644 --- a/src/server/routes/contract/extensions/erc20/read/get.ts +++ b/src/server/routes/contract/extensions/erc20/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc20ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts index 15a992342..8013f7cff 100644 --- a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts index 841ebcda3..578466a13 100644 --- a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts index 19b7a12de..832ce01ef 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts index 0778a85ac..ad7659b05 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts index ae6ccff36..341aabf9d 100644 --- a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc20"; -import { getAccount } from "../../../../../../shared/utils/account"; -import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { getAccount } from "../../../../../../utils/account"; +import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; +import { getChain } from "../../../../../../utils/chain"; +import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { signature20InputSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts index 06ee4548b..fd3399e97 100644 --- a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burn.ts b/src/server/routes/contract/extensions/erc20/write/burn.ts index 7c9f093f7..54ad7e7ce 100644 --- a/src/server/routes/contract/extensions/erc20/write/burn.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { erc20ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts index ad5498414..956d9f9b3 100644 --- a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/claimTo.ts b/src/server/routes/contract/extensions/erc20/write/claimTo.ts index db7678729..fd5a70ffd 100644 --- a/src/server/routes/contract/extensions/erc20/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/claimTo.ts @@ -1,10 +1,10 @@ -import { type Static, Type } from "@sinclair/typebox"; +import { Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc20"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { erc20ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts index dd3e4b601..2fd89eb9c 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/mintTo.ts b/src/server/routes/contract/extensions/erc20/write/mintTo.ts index e78dfb90f..db3a9968e 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts index 7cad12a44..80fd18b02 100644 --- a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts +++ b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts index cc6ced02c..57ce2c8c8 100644 --- a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts index 182259b9b..38fd423ff 100644 --- a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts @@ -3,8 +3,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { signature20OutputSchema } from "../../../../../schemas/erc20"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/transfer.ts b/src/server/routes/contract/extensions/erc20/write/transfer.ts index 75a3c2d14..512903a44 100644 --- a/src/server/routes/contract/extensions/erc20/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc20/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transfer } from "thirdweb/extensions/erc20"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getChain } from "../../../../../../utils/chain"; +import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { TokenAmountStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts index ec1c46403..ce9ed134c 100644 --- a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc20"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getChain } from "../../../../../../utils/chain"; +import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { TokenAmountStringSchema } from "../../../../../schemas/number"; 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..99cd79b48 100644 --- a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts index 1bad0235d..72b9e2aef 100644 --- a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc721ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/canClaim.ts b/src/server/routes/contract/extensions/erc721/read/canClaim.ts index 6aa53c54d..d80226ccd 100644 --- a/src/server/routes/contract/extensions/erc721/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc721/read/canClaim.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/get.ts b/src/server/routes/contract/extensions/erc721/read/get.ts index e5f332ab2..11faf6bdc 100644 --- a/src/server/routes/contract/extensions/erc721/read/get.ts +++ b/src/server/routes/contract/extensions/erc721/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts index f24521b3d..88164318d 100644 --- a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getAll.ts b/src/server/routes/contract/extensions/erc721/read/getAll.ts index 4eb8bacab..043db6f74 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc721/read/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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts index 8d4a62f0e..9158456f5 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts index 88d552910..c4b069987 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts index d39672dac..eee8854cd 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/getOwned.ts b/src/server/routes/contract/extensions/erc721/read/getOwned.ts index 311ef318c..847d69c36 100644 --- a/src/server/routes/contract/extensions/erc721/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc721/read/getOwned.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/isApproved.ts b/src/server/routes/contract/extensions/erc721/read/isApproved.ts index 22d3cbecd..b8ecc6e8a 100644 --- a/src/server/routes/contract/extensions/erc721/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc721/read/isApproved.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts index 281399a7e..0fca0a1f2 100644 --- a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc721"; -import { getAccount } from "../../../../../../shared/utils/account"; -import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { getAccount } from "../../../../../../utils/account"; +import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; +import { getChain } from "../../../../../../utils/chain"; +import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { signature721InputSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts index 5cb0d632f..0636354a2 100644 --- a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts +++ b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts @@ -17,9 +17,9 @@ import { import { decimals } from "thirdweb/extensions/erc20"; import { upload } from "thirdweb/storage"; import { checksumAddress } from "thirdweb/utils"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { prettifyError } from "../../../../../../shared/utils/error"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { getChain } from "../../../../../../utils/chain"; +import { prettifyError } from "../../../../../../utils/error"; +import { thirdwebClient } from "../../../../../../utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { signature721InputSchemaV5, diff --git a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts index 342f63448..94d6d91bb 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/totalCount.ts b/src/server/routes/contract/extensions/erc721/read/totalCount.ts index 5a6cd5809..7599028de 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts index 88c4b12f8..5eb39d2c7 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/burn.ts b/src/server/routes/contract/extensions/erc721/write/burn.ts index 259ba1af1..f0591eafa 100644 --- a/src/server/routes/contract/extensions/erc721/write/burn.ts +++ b/src/server/routes/contract/extensions/erc721/write/burn.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/claimTo.ts b/src/server/routes/contract/extensions/erc721/write/claimTo.ts index 1366bb9cb..a18780e08 100644 --- a/src/server/routes/contract/extensions/erc721/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/claimTo.ts @@ -1,10 +1,10 @@ -import { type Static, Type } from "@sinclair/typebox"; +import { Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc721"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; 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..c553454f8 100644 --- a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts index 38e5aa299..79c14a801 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mintTo.ts index dc48f446a..8099991eb 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintTo.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts index 3f3c29c8f..b521adf4d 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts index ad7fd5aa8..8b3f8e7b3 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts index 42afb844d..8e67bdaae 100644 --- a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts @@ -1,11 +1,11 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, - type sanitizedClaimConditionInputSchema, + sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts index 808c14246..2a85bb169 100644 --- a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts @@ -1,16 +1,16 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk"; +import { Static, Type } from "@sinclair/typebox"; +import { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; -import type { FastifyInstance } from "fastify"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address, Hex } from "thirdweb"; +import { Address, Hex } from "thirdweb"; import { mintWithSignature } from "thirdweb/extensions/erc721"; import { resolvePromisedValue } from "thirdweb/utils"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { insertTransaction } from "../../../../../../shared/utils/transaction/insertTransaction"; -import type { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; +import { insertTransaction } from "../../../../../../utils/transaction/insertTransaction"; +import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { signature721OutputSchema } from "../../../../../schemas/nft"; import { signature721OutputSchemaV5 } from "../../../../../schemas/nft/v5"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/transfer.ts b/src/server/routes/contract/extensions/erc721/write/transfer.ts index 87835ca09..60f00d5bb 100644 --- a/src/server/routes/contract/extensions/erc721/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc721/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getChain } from "../../../../../../utils/chain"; +import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts index e19e8cb9d..404086221 100644 --- a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; -import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getChain } from "../../../../../../utils/chain"; +import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts index d9c9fb6f7..8b8faaa49 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts @@ -1,11 +1,11 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, - type sanitizedClaimConditionInputSchema, + sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts index c8a610821..48ba8e64f 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../utils/cache/getContract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts index 5debad7eb..500b976c6 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts index a7e35ab5d..6b3182668 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts index cd7b396bd..73397c27f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts index c46910f28..1d6228f9c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts index 4b261a5a3..05ff2336a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts index 3351dd6d7..02b353a97 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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..c9b697a25 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..75ff756b8 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..17222f50a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..74c7f63d8 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, 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..79cd57d3d 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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..048a81b78 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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..63db76bd4 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts index f7ebc52d2..674368c5b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts index 25a65fcc1..d99b58077 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts index 53353271c..0b0ffc488 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts index de9247202..81193e015 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts index c02d495e9..f17418ec2 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { currencyValueSchema, marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts index 4813b190c..e44013962 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts index 95d4e19ed..6781ca0d1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts index 6f839ff0c..9c117f18c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { bidSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts index a70f469a6..08c3b6e20 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, 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..64a931d47 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..df6f44c71 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..1b5236a93 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..32ad9f01a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..b348b1b1d 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { englishAuctionInputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, 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..19e591eeb 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..7545db42e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts index e4b9271c7..6497ed6d5 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts index 01c1b6bcd..e913d2911 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts index d752431fc..4eb1991cb 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts index ada1fb3e6..86f476220 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, 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..f1614a731 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..aa205c3ac 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..3cc4deb43 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../../../utils/cache/getContract"; import { OfferV3InputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index f642809bf..56cbb5b10 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../utils/cache/getContract"; import { abiSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/metadata/events.ts b/src/server/routes/contract/metadata/events.ts index f16d65e2f..0d3e769fa 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../utils/cache/getContract"; import { abiEventSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/metadata/extensions.ts b/src/server/routes/contract/metadata/extensions.ts index d4d553173..79255c7f8 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; +import { Static, Type } from "@sinclair/typebox"; import { getAllDetectedExtensionNames } from "@thirdweb-dev/sdk"; -import type { FastifyInstance } from "fastify"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/metadata/functions.ts b/src/server/routes/contract/metadata/functions.ts index 3d45736ba..268254418 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../utils/cache/getContract"; import { abiFunctionSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/read/read.ts b/src/server/routes/contract/read/read.ts index 81721a098..89b0e115d 100644 --- a/src/server/routes/contract/read/read.ts +++ b/src/server/routes/contract/read/read.ts @@ -1,8 +1,8 @@ import { Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; -import { prettifyError } from "../../../../shared/utils/error"; +import { getContract } from "../../../../utils/cache/getContract"; +import { prettifyError } from "../../../../utils/error"; import { createCustomError } from "../../../middleware/error"; import { readRequestQuerySchema, diff --git a/src/server/routes/contract/roles/read/get.ts b/src/server/routes/contract/roles/read/get.ts index f07c1479f..a10b1e827 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/roles/read/getAll.ts b/src/server/routes/contract/roles/read/getAll.ts index ee4a8d920..175b626df 100644 --- a/src/server/routes/contract/roles/read/getAll.ts +++ b/src/server/routes/contract/roles/read/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 { getContract } from "../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../utils/cache/getContract"; import { rolesResponseSchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/roles/write/grant.ts b/src/server/routes/contract/roles/write/grant.ts index 538b2d869..c82ad2269 100644 --- a/src/server/routes/contract/roles/write/grant.ts +++ b/src/server/routes/contract/roles/write/grant.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/roles/write/revoke.ts b/src/server/routes/contract/roles/write/revoke.ts index 063f9c8e1..4b1173132 100644 --- a/src/server/routes/contract/roles/write/revoke.ts +++ b/src/server/routes/contract/roles/write/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 { queueTx } from "../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts index ed85d8712..c6282d135 100644 --- a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts index 163ae5fee..fec257ad5 100644 --- a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts index 239c08778..acfb5c8fd 100644 --- a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts index 6ff5d09c2..4d12d72b0 100644 --- a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../db/transactions/queueTx"; +import { getContract } from "../../../../../utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/addContractSubscription.ts index 05637d75f..bddd24fc1 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/addContractSubscription.ts @@ -1,16 +1,16 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { 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 { WebhooksEventTypes } from "../../../../shared/schemas/webhooks"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; -import { getChain } from "../../../../shared/utils/chain"; -import { thirdwebClient } from "../../../../shared/utils/sdk"; +import { upsertChainIndexer } from "../../../../db/chainIndexers/upsertChainIndexer"; +import { createContractSubscription } from "../../../../db/contractSubscriptions/createContractSubscription"; +import { getContractSubscriptionsUniqueChainIds } from "../../../../db/contractSubscriptions/getContractSubscriptions"; +import { insertWebhook } from "../../../../db/webhooks/createWebhook"; +import { WebhooksEventTypes } from "../../../../schema/webhooks"; +import { getSdk } from "../../../../utils/cache/getSdk"; +import { getChain } from "../../../../utils/chain"; +import { thirdwebClient } from "../../../../utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts index 66a5f0cb8..e708cd8b2 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 "../../../../db/contractEventLogs/getContractEventLogs"; 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..81fb1ac2d 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 { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getAllContractSubscriptions } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getAllContractSubscriptions } from "../../../../db/contractSubscriptions/getContractSubscriptions"; import { contractSubscriptionSchema, toContractSubscriptionSchema, diff --git a/src/server/routes/contract/subscriptions/getLatestBlock.ts b/src/server/routes/contract/subscriptions/getLatestBlock.ts index 1cea5a453..49f81e09c 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 "../../../../db/chainIndexers/getChainIndexer"; 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..3b0711c75 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 { Static, Type } from "@sinclair/typebox"; +import { 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 "../../../../db/contractSubscriptions/deleteContractSubscription"; +import { deleteWebhook } from "../../../../db/webhooks/revokeWebhook"; 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..87b90a530 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 { Static, Type } from "@sinclair/typebox"; +import { 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 "../../../../db/contractSubscriptions/getContractSubscriptions"; +import { getContractTransactionReceiptsByBlock } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; 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..2c76ec6da 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 "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; 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..0d13b9b1d 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 "../../../../db/configuration/getConfiguration"; +import { getTransactionReceiptsByCursor } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/contract/write/write.ts b/src/server/routes/contract/write/write.ts index 3f928832f..b47049786 100644 --- a/src/server/routes/contract/write/write.ts +++ b/src/server/routes/contract/write/write.ts @@ -3,9 +3,9 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prepareContractCall, resolveMethod } from "thirdweb"; import { parseAbiParams, type AbiFunction } from "thirdweb/utils"; -import { getContractV5 } from "../../../../shared/utils/cache/getContractv5"; -import { prettifyError } from "../../../../shared/utils/error"; -import { queueTransaction } from "../../../../shared/utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../utils/cache/getContractv5"; +import { prettifyError } from "../../../../utils/error"; +import { queueTransaction } from "../../../../utils/transaction/queueTransation"; import { createCustomError } from "../../../middleware/error"; import { abiArraySchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilt.ts b/src/server/routes/deploy/prebuilt.ts index 271d298b7..38815a755 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../db/transactions/queueTx"; +import { getSdk } from "../../../utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/edition.ts b/src/server/routes/deploy/prebuilts/edition.ts index 611437a7b..15b99b65b 100644 --- a/src/server/routes/deploy/prebuilts/edition.ts +++ b/src/server/routes/deploy/prebuilts/edition.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/editionDrop.ts b/src/server/routes/deploy/prebuilts/editionDrop.ts index 8ffa11299..9e2c11bbd 100644 --- a/src/server/routes/deploy/prebuilts/editionDrop.ts +++ b/src/server/routes/deploy/prebuilts/editionDrop.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/marketplaceV3.ts b/src/server/routes/deploy/prebuilts/marketplaceV3.ts index 8d70769a9..8635946c9 100644 --- a/src/server/routes/deploy/prebuilts/marketplaceV3.ts +++ b/src/server/routes/deploy/prebuilts/marketplaceV3.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/multiwrap.ts b/src/server/routes/deploy/prebuilts/multiwrap.ts index beb778bda..95df0dd8a 100644 --- a/src/server/routes/deploy/prebuilts/multiwrap.ts +++ b/src/server/routes/deploy/prebuilts/multiwrap.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/nftCollection.ts b/src/server/routes/deploy/prebuilts/nftCollection.ts index d12c2ec63..002f6e629 100644 --- a/src/server/routes/deploy/prebuilts/nftCollection.ts +++ b/src/server/routes/deploy/prebuilts/nftCollection.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/nftDrop.ts b/src/server/routes/deploy/prebuilts/nftDrop.ts index 19ca2a2f2..740df4fe8 100644 --- a/src/server/routes/deploy/prebuilts/nftDrop.ts +++ b/src/server/routes/deploy/prebuilts/nftDrop.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/pack.ts b/src/server/routes/deploy/prebuilts/pack.ts index 9e5eedbec..1c7c0e44f 100644 --- a/src/server/routes/deploy/prebuilts/pack.ts +++ b/src/server/routes/deploy/prebuilts/pack.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/signatureDrop.ts b/src/server/routes/deploy/prebuilts/signatureDrop.ts index f7a4a6290..f5f54d385 100644 --- a/src/server/routes/deploy/prebuilts/signatureDrop.ts +++ b/src/server/routes/deploy/prebuilts/signatureDrop.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/split.ts b/src/server/routes/deploy/prebuilts/split.ts index 8184c0699..8b9435a3e 100644 --- a/src/server/routes/deploy/prebuilts/split.ts +++ b/src/server/routes/deploy/prebuilts/split.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/token.ts b/src/server/routes/deploy/prebuilts/token.ts index 50fde94fb..13980f951 100644 --- a/src/server/routes/deploy/prebuilts/token.ts +++ b/src/server/routes/deploy/prebuilts/token.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/tokenDrop.ts b/src/server/routes/deploy/prebuilts/tokenDrop.ts index 73f55b682..6129ecfa7 100644 --- a/src/server/routes/deploy/prebuilts/tokenDrop.ts +++ b/src/server/routes/deploy/prebuilts/tokenDrop.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/vote.ts b/src/server/routes/deploy/prebuilts/vote.ts index fce36471f..2073993cd 100644 --- a/src/server/routes/deploy/prebuilts/vote.ts +++ b/src/server/routes/deploy/prebuilts/vote.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { Address } from "thirdweb"; +import { queueTx } from "../../../../db/transactions/queueTx"; +import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/published.ts b/src/server/routes/deploy/published.ts index 13a313541..96fd698bb 100644 --- a/src/server/routes/deploy/published.ts +++ b/src/server/routes/deploy/published.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { isAddress } from "thirdweb"; -import { queueTx } from "../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../db/transactions/queueTx"; +import { getSdk } from "../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { publishedDeployParamSchema, diff --git a/src/server/routes/relayer/create.ts b/src/server/routes/relayer/create.ts index f7b34d05f..1cda9f9b1 100644 --- a/src/server/routes/relayer/create.ts +++ b/src/server/routes/relayer/create.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { prisma } from "../../../shared/db/client"; +import { prisma } from "../../../db/client"; import { AddressSchema } from "../../schemas/address"; import { chainIdOrSlugSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/relayer/getAll.ts b/src/server/routes/relayer/getAll.ts index 3798b5e67..55fba56d8 100644 --- a/src/server/routes/relayer/getAll.ts +++ b/src/server/routes/relayer/getAll.ts @@ -1,7 +1,7 @@ import { Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { prisma } from "../../../shared/db/client"; +import { prisma } from "../../../db/client"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index 604a0774d..866f18ac8 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -8,10 +8,10 @@ import { ForwarderAbi, ForwarderAbiEIP712ChainlessDomain, NativeMetaTransaction, -} from "../../../shared/schemas/relayer"; -import { getRelayerById } from "../../../shared/db/relayer/getRelayerById"; -import { queueTx } from "../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../shared/utils/cache/getSdk"; +} from "../../../constants/relayer"; +import { getRelayerById } from "../../../db/relayer/getRelayerById"; +import { queueTx } from "../../../db/transactions/queueTx"; +import { getSdk } from "../../../utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema, diff --git a/src/server/routes/relayer/revoke.ts b/src/server/routes/relayer/revoke.ts index aa84eb1ad..c69b8515d 100644 --- a/src/server/routes/relayer/revoke.ts +++ b/src/server/routes/relayer/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 { prisma } from "../../../shared/db/client"; +import { prisma } from "../../../db/client"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/relayer/update.ts b/src/server/routes/relayer/update.ts index 421ac46af..aca004e0f 100644 --- a/src/server/routes/relayer/update.ts +++ b/src/server/routes/relayer/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 { prisma } from "../../../shared/db/client"; +import { prisma } from "../../../db/client"; import { AddressSchema } from "../../schemas/address"; import { chainIdOrSlugSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/system/health.ts b/src/server/routes/system/health.ts index 23672c92f..2106aecae 100644 --- a/src/server/routes/system/health.ts +++ b/src/server/routes/system/health.ts @@ -1,10 +1,10 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { isDatabaseReachable } from "../../../shared/db/client"; -import { env } from "../../../shared/utils/env"; -import { isRedisReachable } from "../../../shared/utils/redis/redis"; -import { thirdwebClientId } from "../../../shared/utils/sdk"; +import { isDatabaseReachable } from "../../../db/client"; +import { env } from "../../../utils/env"; +import { isRedisReachable } from "../../../utils/redis/redis"; +import { thirdwebClientId } from "../../../utils/sdk"; import { createCustomError } from "../../middleware/error"; type EngineFeature = diff --git a/src/server/routes/system/queue.ts b/src/server/routes/system/queue.ts index 8c01d2302..92763139e 100644 --- a/src/server/routes/system/queue.ts +++ b/src/server/routes/system/queue.ts @@ -1,9 +1,9 @@ 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 { getPercentile } from "../../../shared/utils/math"; -import type { MinedTransaction } from "../../../shared/utils/transaction/types"; +import { TransactionDB } from "../../../db/transactions/db"; +import { getPercentile } from "../../../utils/math"; +import type { MinedTransaction } from "../../../utils/transaction/types"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/blockchain/getLogs.ts b/src/server/routes/transaction/blockchain/getLogs.ts index 099dc246d..26a185dab 100644 --- a/src/server/routes/transaction/blockchain/getLogs.ts +++ b/src/server/routes/transaction/blockchain/getLogs.ts @@ -12,10 +12,10 @@ import { type Hex, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import type { TransactionReceipt } from "thirdweb/transaction"; -import { TransactionDB } from "../../../../shared/db/transactions/db"; -import { getChain } from "../../../../shared/utils/chain"; -import { thirdwebClient } from "../../../../shared/utils/sdk"; +import { TransactionReceipt } from "thirdweb/transaction"; +import { TransactionDB } from "../../../../db/transactions/db"; +import { getChain } from "../../../../utils/chain"; +import { thirdwebClient } from "../../../../utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/getReceipt.ts b/src/server/routes/transaction/blockchain/getReceipt.ts index b5d3c4378..13cfd7786 100644 --- a/src/server/routes/transaction/blockchain/getReceipt.ts +++ b/src/server/routes/transaction/blockchain/getReceipt.ts @@ -9,12 +9,12 @@ import { } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { TransactionReceipt } from "viem"; -import { getChain } from "../../../../shared/utils/chain"; +import { getChain } from "../../../../utils/chain"; import { fromTransactionStatus, fromTransactionType, thirdwebClient, -} from "../../../../shared/utils/sdk"; +} from "../../../../utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts index 220add1ae..76c8c43a0 100644 --- a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts +++ b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../../../shared/utils/env"; +import { env } from "../../../../utils/env"; import { createCustomError } from "../../../middleware/error"; import { TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/sendSignedTx.ts b/src/server/routes/transaction/blockchain/sendSignedTx.ts index fe7e1ac83..5fc53a188 100644 --- a/src/server/routes/transaction/blockchain/sendSignedTx.ts +++ b/src/server/routes/transaction/blockchain/sendSignedTx.ts @@ -2,8 +2,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_sendRawTransaction, getRpcClient, isHex } from "thirdweb"; -import { getChain } from "../../../../shared/utils/chain"; -import { thirdwebClient } from "../../../../shared/utils/sdk"; +import { getChain } from "../../../../utils/chain"; +import { thirdwebClient } from "../../../../utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { TransactionHashSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts index 8db91f8e3..f5b3b28a6 100644 --- a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts +++ b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts @@ -2,8 +2,8 @@ import { Type, type Static } from "@sinclair/typebox"; import { Value } from "@sinclair/typebox/value"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../../../shared/utils/env"; -import { thirdwebClientId } from "../../../../shared/utils/sdk"; +import { env } from "../../../../utils/env"; +import { thirdwebClientId } from "../../../../utils/sdk"; import { TransactionHashSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index cb49beb59..d9b704383 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -1,15 +1,15 @@ 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 { getBlockNumberish } from "../../../shared/utils/block"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; -import { getChain } from "../../../shared/utils/chain"; -import { msSince } from "../../../shared/utils/date"; -import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancelTransaction"; -import type { CancelledTransaction } from "../../../shared/utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; -import { reportUsage } from "../../../shared/utils/usage"; +import { TransactionDB } from "../../../db/transactions/db"; +import { getBlockNumberish } from "../../../utils/block"; +import { getConfig } from "../../../utils/cache/getConfig"; +import { getChain } from "../../../utils/chain"; +import { msSince } from "../../../utils/date"; +import { sendCancellationTransaction } from "../../../utils/transaction/cancelTransaction"; +import type { CancelledTransaction } from "../../../utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../../utils/transaction/webhook"; +import { reportUsage } from "../../../utils/usage"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; diff --git a/src/server/routes/transaction/getAll.ts b/src/server/routes/transaction/getAll.ts index 6243e0fc7..5b58f5b3e 100644 --- a/src/server/routes/transaction/getAll.ts +++ b/src/server/routes/transaction/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 { TransactionDB } from "../../../shared/db/transactions/db"; +import { TransactionDB } from "../../../db/transactions/db"; import { PaginationSchema } from "../../schemas/pagination"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/transaction/getAllDeployedContracts.ts b/src/server/routes/transaction/getAllDeployedContracts.ts index d4745f9ad..4bcd88a61 100644 --- a/src/server/routes/transaction/getAllDeployedContracts.ts +++ b/src/server/routes/transaction/getAllDeployedContracts.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../shared/db/transactions/db"; +import { TransactionDB } from "../../../db/transactions/db"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { TransactionSchema, diff --git a/src/server/routes/transaction/retry-failed.ts b/src/server/routes/transaction/retry-failed.ts index 1550a97ca..5ac43c43b 100644 --- a/src/server/routes/transaction/retry-failed.ts +++ b/src/server/routes/transaction/retry-failed.ts @@ -1,12 +1,12 @@ 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 { TransactionDB } from "../../../db/transactions/db"; import { getReceiptForEOATransaction, getReceiptForUserOp, -} from "../../../shared/lib/transaction/get-transaction-receipt"; -import type { QueuedTransaction } from "../../../shared/utils/transaction/types"; +} from "../../../lib/transaction/get-transaction-receipt"; +import type { QueuedTransaction } from "../../../utils/transaction/types"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/transaction/retry.ts b/src/server/routes/transaction/retry.ts index affd9a88c..c8716e2dd 100644 --- a/src/server/routes/transaction/retry.ts +++ b/src/server/routes/transaction/retry.ts @@ -1,9 +1,9 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../shared/db/transactions/db"; -import { maybeBigInt } from "../../../shared/utils/primitiveTypes"; -import type { SentTransaction } from "../../../shared/utils/transaction/types"; +import { TransactionDB } from "../../../db/transactions/db"; +import { maybeBigInt } from "../../../utils/primitiveTypes"; +import { SentTransaction } from "../../../utils/transaction/types"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/status.ts b/src/server/routes/transaction/status.ts index 616009cbf..a5c9c1b95 100644 --- a/src/server/routes/transaction/status.ts +++ b/src/server/routes/transaction/status.ts @@ -1,9 +1,9 @@ -import type { SocketStream } from "@fastify/websocket"; -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { SocketStream } from "@fastify/websocket"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../shared/db/transactions/db"; -import { logger } from "../../../shared/utils/logger"; +import { TransactionDB } from "../../../db/transactions/db"; +import { logger } from "../../../utils/logger"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/transaction/sync-retry.ts b/src/server/routes/transaction/sync-retry.ts index e6ef887c4..3eabdbd1e 100644 --- a/src/server/routes/transaction/sync-retry.ts +++ b/src/server/routes/transaction/sync-retry.ts @@ -2,18 +2,15 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { toSerializableTransaction } from "thirdweb"; -import { TransactionDB } from "../../../shared/db/transactions/db"; -import { getReceiptForEOATransaction } from "../../../shared/lib/transaction/get-transaction-receipt"; -import { getAccount } from "../../../shared/utils/account"; -import { getBlockNumberish } from "../../../shared/utils/block"; -import { getChain } from "../../../shared/utils/chain"; -import { - getChecksumAddress, - maybeBigInt, -} from "../../../shared/utils/primitiveTypes"; -import { thirdwebClient } from "../../../shared/utils/sdk"; -import type { SentTransaction } from "../../../shared/utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; +import { TransactionDB } from "../../../db/transactions/db"; +import { getReceiptForEOATransaction } from "../../../lib/transaction/get-transaction-receipt"; +import { getAccount } from "../../../utils/account"; +import { getBlockNumberish } from "../../../utils/block"; +import { getChain } from "../../../utils/chain"; +import { getChecksumAddress, maybeBigInt } from "../../../utils/primitiveTypes"; +import { thirdwebClient } from "../../../utils/sdk"; +import type { SentTransaction } from "../../../utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../../utils/transaction/webhook"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; diff --git a/src/server/routes/webhooks/create.ts b/src/server/routes/webhooks/create.ts index b9e71f2a9..a1cc44b32 100644 --- a/src/server/routes/webhooks/create.ts +++ b/src/server/routes/webhooks/create.ts @@ -1,8 +1,8 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { insertWebhook } from "../../../shared/db/webhooks/createWebhook"; -import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; +import { insertWebhook } from "../../../db/webhooks/createWebhook"; +import { WebhooksEventTypes } from "../../../schema/webhooks"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { WebhookSchema, toWebhookSchema } from "../../schemas/webhook"; diff --git a/src/server/routes/webhooks/events.ts b/src/server/routes/webhooks/events.ts index 35f636d0b..1e621e771 100644 --- a/src/server/routes/webhooks/events.ts +++ b/src/server/routes/webhooks/events.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; -import type { FastifyInstance } from "fastify"; +import { Static, Type } from "@sinclair/typebox"; +import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; +import { WebhooksEventTypes } from "../../../schema/webhooks"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/webhooks/getAll.ts b/src/server/routes/webhooks/getAll.ts index 1c3c26149..9e22617f4 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 "../../../db/webhooks/getAllWebhooks"; 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..d6725c6ba 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 "../../../db/webhooks/getWebhook"; +import { deleteWebhook } from "../../../db/webhooks/revokeWebhook"; 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..68bc341c6 100644 --- a/src/server/routes/webhooks/test.ts +++ b/src/server/routes/webhooks/test.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 { sendWebhookRequest } from "../../../shared/utils/webhook"; +import { getWebhook } from "../../../db/webhooks/getWebhook"; +import { sendWebhookRequest } from "../../../utils/webhook"; import { createCustomError } from "../../middleware/error"; import { NumberStringSchema } from "../../schemas/number"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/shared/schemas/auth.ts b/src/server/schemas/auth/index.ts similarity index 100% rename from src/shared/schemas/auth.ts rename to src/server/schemas/auth/index.ts diff --git a/src/shared/schemas/keypair.ts b/src/server/schemas/keypairs.ts similarity index 93% rename from src/shared/schemas/keypair.ts rename to src/server/schemas/keypairs.ts index 5e0a85bc3..31a3a7bc7 100644 --- a/src/shared/schemas/keypair.ts +++ b/src/server/schemas/keypairs.ts @@ -1,5 +1,5 @@ -import type { Keypairs } from "@prisma/client"; -import { type Static, Type } from "@sinclair/typebox"; +import { Keypairs } from "@prisma/client"; +import { Static, Type } from "@sinclair/typebox"; // https://github.com/auth0/node-jsonwebtoken#algorithms-supported const _supportedAlgorithms = [ diff --git a/src/server/schemas/transaction/index.ts b/src/server/schemas/transaction/index.ts index c2ddb8825..c9dd5500c 100644 --- a/src/server/schemas/transaction/index.ts +++ b/src/server/schemas/transaction/index.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { Hex } from "thirdweb"; import { stringify } from "thirdweb/utils"; -import type { AnyTransaction } from "../../../shared/utils/transaction/types"; +import type { AnyTransaction } from "../../../utils/transaction/types"; import { AddressSchema, TransactionHashSchema } from "../address"; export const TransactionSchema = Type.Object({ diff --git a/src/server/schemas/wallet/index.ts b/src/server/schemas/wallet/index.ts index 3f4d940f4..c4119fa61 100644 --- a/src/server/schemas/wallet/index.ts +++ b/src/server/schemas/wallet/index.ts @@ -1,6 +1,6 @@ import { Type } from "@sinclair/typebox"; import { getAddress, type Address } from "thirdweb"; -import { env } from "../../../shared/utils/env"; +import { env } from "../../../utils/env"; import { badAddressError } from "../../middleware/error"; import { AddressSchema } from "../address"; import { chainIdOrSlugSchema } from "../chain"; diff --git a/src/server/utils/chain.ts b/src/server/utils/chain.ts index b0e5c7d7b..5ea5741d6 100644 --- a/src/server/utils/chain.ts +++ b/src/server/utils/chain.ts @@ -1,5 +1,5 @@ import { getChainBySlugAsync } from "@thirdweb-dev/chains"; -import { getChain } from "../../shared/utils/chain"; +import { getChain } from "../../utils/chain"; import { badChainError } from "../middleware/error"; /** diff --git a/src/server/utils/storage/localStorage.ts b/src/server/utils/storage/localStorage.ts index 95665f675..8c5557faa 100644 --- a/src/server/utils/storage/localStorage.ts +++ b/src/server/utils/storage/localStorage.ts @@ -1,8 +1,8 @@ import type { AsyncStorage } from "@thirdweb-dev/wallets"; import fs from "node:fs"; -import { prisma } from "../../../shared/db/client"; -import { WalletType } from "../../../shared/schemas/wallet"; -import { logger } from "../../../shared/utils/logger"; +import { prisma } from "../../../db/client"; +import { WalletType } from "../../../schema/wallet"; +import { logger } from "../../../utils/logger"; /** * @deprecated @@ -38,7 +38,7 @@ export class LocalFileStorage implements AsyncStorage { logger({ service: "server", level: "error", - message: "No local wallet found!", + message: `No local wallet found!`, }); return null; } diff --git a/src/server/utils/transactionOverrides.ts b/src/server/utils/transactionOverrides.ts index 83f728024..a048504ed 100644 --- a/src/server/utils/transactionOverrides.ts +++ b/src/server/utils/transactionOverrides.ts @@ -1,6 +1,6 @@ import type { Static } from "@sinclair/typebox"; -import { maybeBigInt } from "../../shared/utils/primitiveTypes"; -import type { InsertedTransaction } from "../../shared/utils/transaction/types"; +import { maybeBigInt } from "../../utils/primitiveTypes"; +import type { InsertedTransaction } from "../../utils/transaction/types"; import type { txOverridesSchema, txOverridesWithValueSchema, diff --git a/src/server/utils/wallets/createGcpKmsWallet.ts b/src/server/utils/wallets/createGcpKmsWallet.ts index bf4a249a2..2b4b47201 100644 --- a/src/server/utils/wallets/createGcpKmsWallet.ts +++ b/src/server/utils/wallets/createGcpKmsWallet.ts @@ -1,7 +1,7 @@ import { KeyManagementServiceClient } from "@google-cloud/kms"; -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; -import { WalletType } from "../../../shared/schemas/wallet"; -import { thirdwebClient } from "../../../shared/utils/sdk"; +import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; +import { WalletType } from "../../../schema/wallet"; +import { thirdwebClient } from "../../../utils/sdk"; import { FetchGcpKmsWalletParamsError, fetchGcpKmsWalletParams, diff --git a/src/server/utils/wallets/createLocalWallet.ts b/src/server/utils/wallets/createLocalWallet.ts index c8b187171..03392c1a6 100644 --- a/src/server/utils/wallets/createLocalWallet.ts +++ b/src/server/utils/wallets/createLocalWallet.ts @@ -1,9 +1,9 @@ import { encryptKeystore } from "@ethersproject/json-wallets"; import { privateKeyToAccount } from "thirdweb/wallets"; import { generatePrivateKey } from "viem/accounts"; -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; -import { env } from "../../../shared/utils/env"; -import { thirdwebClient } from "../../../shared/utils/sdk"; +import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; +import { env } from "../../../utils/env"; +import { thirdwebClient } from "../../../utils/sdk"; interface CreateLocalWallet { label?: string; diff --git a/src/server/utils/wallets/createSmartWallet.ts b/src/server/utils/wallets/createSmartWallet.ts index 263c60f03..5859a430a 100644 --- a/src/server/utils/wallets/createSmartWallet.ts +++ b/src/server/utils/wallets/createSmartWallet.ts @@ -1,8 +1,8 @@ import { defineChain, type Address, type Chain } from "thirdweb"; import { smartWallet, type Account } from "thirdweb/wallets"; -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; -import { WalletType } from "../../../shared/schemas/wallet"; -import { thirdwebClient } from "../../../shared/utils/sdk"; +import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; +import { WalletType } from "../../../schema/wallet"; +import { thirdwebClient } from "../../../utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; import { createAwsKmsKey, diff --git a/src/server/utils/wallets/fetchAwsKmsWalletParams.ts b/src/server/utils/wallets/fetchAwsKmsWalletParams.ts index eea36e9ca..f94cd0f1f 100644 --- a/src/server/utils/wallets/fetchAwsKmsWalletParams.ts +++ b/src/server/utils/wallets/fetchAwsKmsWalletParams.ts @@ -1,4 +1,4 @@ -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../utils/cache/getConfig"; export type AwsKmsWalletParams = { awsAccessKeyId: string; diff --git a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts b/src/server/utils/wallets/fetchGcpKmsWalletParams.ts index a5f6de90b..b0c468ebc 100644 --- a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts +++ b/src/server/utils/wallets/fetchGcpKmsWalletParams.ts @@ -1,4 +1,4 @@ -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../utils/cache/getConfig"; export type GcpKmsWalletParams = { gcpApplicationCredentialEmail: string; diff --git a/src/server/utils/wallets/getAwsKmsAccount.ts b/src/server/utils/wallets/getAwsKmsAccount.ts index 33d828ec7..91e99104d 100644 --- a/src/server/utils/wallets/getAwsKmsAccount.ts +++ b/src/server/utils/wallets/getAwsKmsAccount.ts @@ -17,7 +17,7 @@ import type { TypedDataDefinition, } from "viem"; import { hashTypedData } from "viem"; -import { getChain } from "../../../shared/utils/chain"; +import { getChain } from "../../../utils/chain"; type SendTransactionResult = { transactionHash: Hex; diff --git a/src/server/utils/wallets/getGcpKmsAccount.ts b/src/server/utils/wallets/getGcpKmsAccount.ts index cf02625a7..b73135331 100644 --- a/src/server/utils/wallets/getGcpKmsAccount.ts +++ b/src/server/utils/wallets/getGcpKmsAccount.ts @@ -17,7 +17,7 @@ import type { TypedDataDefinition, } from "viem"; import { hashTypedData } from "viem"; -import { getChain } from "../../../shared/utils/chain"; // Adjust import path as needed +import { getChain } from "../../../utils/chain"; // Adjust import path as needed type SendTransactionResult = { transactionHash: Hex; diff --git a/src/server/utils/wallets/getLocalWallet.ts b/src/server/utils/wallets/getLocalWallet.ts index dd078f4e4..0f4456423 100644 --- a/src/server/utils/wallets/getLocalWallet.ts +++ b/src/server/utils/wallets/getLocalWallet.ts @@ -3,11 +3,11 @@ 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 { getChain } from "../../../shared/utils/chain"; -import { env } from "../../../shared/utils/env"; -import { logger } from "../../../shared/utils/logger"; -import { thirdwebClient } from "../../../shared/utils/sdk"; +import { getWalletDetails } from "../../../db/wallets/getWalletDetails"; +import { getChain } from "../../../utils/chain"; +import { env } from "../../../utils/env"; +import { logger } from "../../../utils/logger"; +import { thirdwebClient } from "../../../utils/sdk"; import { badChainError } from "../../middleware/error"; import { LocalFileStorage } from "../storage/localStorage"; diff --git a/src/server/utils/wallets/getSmartWallet.ts b/src/server/utils/wallets/getSmartWallet.ts index 67db9f1d1..59ab4d885 100644 --- a/src/server/utils/wallets/getSmartWallet.ts +++ b/src/server/utils/wallets/getSmartWallet.ts @@ -1,7 +1,7 @@ import { SmartWallet, type EVMWallet } from "@thirdweb-dev/wallets"; -import { getContract } from "../../../shared/utils/cache/getContract"; -import { env } from "../../../shared/utils/env"; -import { redis } from "../../../shared/utils/redis/redis"; +import { getContract } from "../../../utils/cache/getContract"; +import { env } from "../../../utils/env"; +import { redis } from "../../../utils/redis/redis"; interface GetSmartWalletParams { chainId: number; diff --git a/src/server/utils/wallets/importAwsKmsWallet.ts b/src/server/utils/wallets/importAwsKmsWallet.ts index 82d3969b4..159db1a69 100644 --- a/src/server/utils/wallets/importAwsKmsWallet.ts +++ b/src/server/utils/wallets/importAwsKmsWallet.ts @@ -1,6 +1,6 @@ -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; -import { WalletType } from "../../../shared/schemas/wallet"; -import { thirdwebClient } from "../../../shared/utils/sdk"; +import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; +import { WalletType } from "../../../schema/wallet"; +import { thirdwebClient } from "../../../utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; import { getAwsKmsAccount } from "./getAwsKmsAccount"; diff --git a/src/server/utils/wallets/importGcpKmsWallet.ts b/src/server/utils/wallets/importGcpKmsWallet.ts index d34d1f865..5ac149b55 100644 --- a/src/server/utils/wallets/importGcpKmsWallet.ts +++ b/src/server/utils/wallets/importGcpKmsWallet.ts @@ -1,6 +1,6 @@ -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; -import { WalletType } from "../../../shared/schemas/wallet"; -import { thirdwebClient } from "../../../shared/utils/sdk"; +import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; +import { WalletType } from "../../../schema/wallet"; +import { thirdwebClient } from "../../../utils/sdk"; import { getGcpKmsAccount } from "./getGcpKmsAccount"; interface ImportGcpKmsWalletParams { diff --git a/src/server/utils/wallets/importLocalWallet.ts b/src/server/utils/wallets/importLocalWallet.ts index a917c484f..3ad1c7a6e 100644 --- a/src/server/utils/wallets/importLocalWallet.ts +++ b/src/server/utils/wallets/importLocalWallet.ts @@ -1,5 +1,5 @@ import { LocalWallet } from "@thirdweb-dev/wallets"; -import { env } from "../../../shared/utils/env"; +import { env } from "../../../utils/env"; import { LocalFileStorage } from "../storage/localStorage"; type ImportLocalWalletParams = diff --git a/src/server/utils/websocket.ts b/src/server/utils/websocket.ts index b18f1dd13..4e68a198d 100644 --- a/src/server/utils/websocket.ts +++ b/src/server/utils/websocket.ts @@ -1,9 +1,9 @@ -import type { SocketStream } from "@fastify/websocket"; -import type { Static } from "@sinclair/typebox"; -import type { FastifyRequest } from "fastify"; -import { logger } from "../../shared/utils/logger"; -import type { TransactionSchema } from "../schemas/transaction"; -import { type UserSubscription, subscriptionsData } from "../schemas/websocket"; +import { SocketStream } from "@fastify/websocket"; +import { Static } from "@sinclair/typebox"; +import { FastifyRequest } from "fastify"; +import { logger } from "../../utils/logger"; +import { TransactionSchema } from "../schemas/transaction"; +import { UserSubscription, subscriptionsData } from "../schemas/websocket"; // websocket timeout, i.e., ws connection closed after 10 seconds const timeoutDuration = 10 * 60 * 1000; diff --git a/tests/unit/auth.test.ts b/src/tests/auth.test.ts similarity index 96% rename from tests/unit/auth.test.ts rename to src/tests/auth.test.ts index 7ea7ab5f2..8e6e774e9 100644 --- a/tests/unit/auth.test.ts +++ b/src/tests/auth.test.ts @@ -1,22 +1,19 @@ import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { LocalWallet } from "@thirdweb-dev/wallets"; -import type { FastifyRequest } from "fastify/types/request"; +import { FastifyRequest } from "fastify/types/request"; import jsonwebtoken from "jsonwebtoken"; -import { getPermissions } from "../../src/shared/db/permissions/getPermissions"; -import { WebhooksEventTypes } from "../../src/shared/schemas/webhooks"; -import { onRequest } from "../../src/server/middleware/auth"; -import { - THIRDWEB_DASHBOARD_ISSUER, - handleSiwe, -} from "../../src/shared/utils/auth"; -import { getAccessToken } from "../../src/shared/utils/cache/accessToken"; -import { getAuthWallet } from "../../src/shared/utils/cache/authWallet"; -import { getConfig } from "../../src/shared/utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../src/shared/utils/cache/getWebhook"; -import { getKeypair } from "../../src/shared/utils/cache/keypair"; -import { sendWebhookRequest } from "../../src/shared/utils/webhook"; -import { Permission } from "../../src/shared/schemas"; +import { getPermissions } from "../db/permissions/getPermissions"; +import { WebhooksEventTypes } from "../schema/webhooks"; +import { onRequest } from "../server/middleware/auth"; +import { Permission } from "../server/schemas/auth"; +import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../utils/auth"; +import { getAccessToken } from "../utils/cache/accessToken"; +import { getAuthWallet } from "../utils/cache/authWallet"; +import { getConfig } from "../utils/cache/getConfig"; +import { getWebhooksByEventType } from "../utils/cache/getWebhook"; +import { getKeypair } from "../utils/cache/keypair"; +import { sendWebhookRequest } from "../utils/webhook"; vi.mock("../utils/cache/accessToken"); const mockGetAccessToken = vi.mocked(getAccessToken); diff --git a/tests/unit/aws-arn.test.ts b/src/tests/aws-arn.test.ts similarity index 97% rename from tests/unit/aws-arn.test.ts rename to src/tests/aws-arn.test.ts index 8b46025f3..cc885a4a9 100644 --- a/tests/unit/aws-arn.test.ts +++ b/src/tests/aws-arn.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { getAwsKmsArn, splitAwsKmsArn, -} from "../../src/server/utils/wallets/awsKmsArn"; +} from "../server/utils/wallets/awsKmsArn"; describe("splitAwsKmsArn", () => { it("should correctly split a valid AWS KMS ARN", () => { diff --git a/tests/unit/chain.test.ts b/src/tests/chain.test.ts similarity index 96% rename from tests/unit/chain.test.ts rename to src/tests/chain.test.ts index dff36db94..4a3684a6c 100644 --- a/tests/unit/chain.test.ts +++ b/src/tests/chain.test.ts @@ -3,8 +3,8 @@ import { getChainBySlugAsync, } from "@thirdweb-dev/chains"; import { beforeEach, describe, expect, it, vi } from "vitest"; -import { getChainIdFromChain } from "../../src/server/utils/chain"; -import { getConfig } from "../../src/shared/utils/cache/getConfig"; +import { getChainIdFromChain } from "../server/utils/chain"; +import { getConfig } from "../utils/cache/getConfig"; // Mock the external dependencies vi.mock("../utils/cache/getConfig"); diff --git a/tests/shared/aws-kms.ts b/src/tests/config/aws-kms.ts similarity index 100% rename from tests/shared/aws-kms.ts rename to src/tests/config/aws-kms.ts diff --git a/tests/shared/gcp-kms.ts b/src/tests/config/gcp-kms.ts similarity index 100% rename from tests/shared/gcp-kms.ts rename to src/tests/config/gcp-kms.ts diff --git a/tests/unit/gcp-resource-path.test.ts b/src/tests/gcp-resource-path.test.ts similarity index 97% rename from tests/unit/gcp-resource-path.test.ts rename to src/tests/gcp-resource-path.test.ts index 52a497d2a..ae6da618f 100644 --- a/tests/unit/gcp-resource-path.test.ts +++ b/src/tests/gcp-resource-path.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { getGcpKmsResourcePath, splitGcpKmsResourcePath, -} from "../../src/server/utils/wallets/gcpKmsResourcePath"; +} from "../server/utils/wallets/gcpKmsResourcePath"; describe("splitGcpKmsResourcePath", () => { it("should correctly split a valid GCP KMS resource path", () => { diff --git a/tests/unit/math.test.ts b/src/tests/math.test.ts similarity index 93% rename from tests/unit/math.test.ts rename to src/tests/math.test.ts index 725084dd1..6303d6bed 100644 --- a/tests/unit/math.test.ts +++ b/src/tests/math.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { getPercentile } from "../../src/shared/utils/math"; +import { getPercentile } from "../utils/math"; describe("getPercentile", () => { it("should correctly calculate the p50 (median) of a sorted array", () => { diff --git a/tests/unit/schema.test.ts b/src/tests/schema.test.ts similarity index 97% rename from tests/unit/schema.test.ts rename to src/tests/schema.test.ts index c1de80d36..17f4b167a 100644 --- a/tests/unit/schema.test.ts +++ b/src/tests/schema.test.ts @@ -4,8 +4,8 @@ import { AddressSchema, HexSchema, TransactionHashSchema, -} from "../../src/server/schemas/address"; -import { chainIdOrSlugSchema } from "../../src/server/schemas/chain"; +} from "../server/schemas/address"; +import { chainIdOrSlugSchema } from "../server/schemas/chain"; // Test cases describe("chainIdOrSlugSchema", () => { diff --git a/tests/shared/chain.ts b/src/tests/shared/chain.ts similarity index 100% rename from tests/shared/chain.ts rename to src/tests/shared/chain.ts diff --git a/tests/shared/client.ts b/src/tests/shared/client.ts similarity index 100% rename from tests/shared/client.ts rename to src/tests/shared/client.ts diff --git a/tests/shared/typed-data.ts b/src/tests/shared/typed-data.ts similarity index 100% rename from tests/shared/typed-data.ts rename to src/tests/shared/typed-data.ts diff --git a/tests/unit/swr.test.ts b/src/tests/swr.test.ts similarity index 98% rename from tests/unit/swr.test.ts rename to src/tests/swr.test.ts index 33fb485ef..ce709ddf3 100644 --- a/tests/unit/swr.test.ts +++ b/src/tests/swr.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; -import { createSWRCache, type SWRCache } from "../../src/shared/lib/cache/swr"; +import { createSWRCache, type SWRCache } from "../lib/cache/swr"; describe("SWRCache", () => { let cache: SWRCache; diff --git a/tests/unit/validator.test.ts b/src/tests/validator.test.ts similarity index 94% rename from tests/unit/validator.test.ts rename to src/tests/validator.test.ts index f15612258..31304c01d 100644 --- a/tests/unit/validator.test.ts +++ b/src/tests/validator.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { isValidWebhookUrl } from "../../src/server/utils/validator"; +import { isValidWebhookUrl } from "../server/utils/validator"; describe("isValidWebhookUrl", () => { it("should return true for a valid HTTPS URL", () => { diff --git a/tests/unit/aws-kms.test.ts b/src/tests/wallets/aws-kms.test.ts similarity index 95% rename from tests/unit/aws-kms.test.ts rename to src/tests/wallets/aws-kms.test.ts index b02c4e28a..4d0b7a129 100644 --- a/tests/unit/aws-kms.test.ts +++ b/src/tests/wallets/aws-kms.test.ts @@ -1,7 +1,11 @@ import { beforeAll, expect, test, vi } from "vitest"; import { ANVIL_CHAIN, anvilTestClient } from "../shared/chain.ts"; + +import { TEST_AWS_KMS_CONFIG } from "../config/aws-kms.ts"; + import { typedData } from "../shared/typed-data.ts"; + import { verifyTypedData } from "thirdweb"; import { verifyEOASignature } from "thirdweb/auth"; import { @@ -10,9 +14,8 @@ import { } from "thirdweb/transaction"; import { toUnits, toWei } from "thirdweb/utils"; import { getWalletBalance } from "thirdweb/wallets"; +import { getAwsKmsAccount } from "../../server/utils/wallets/getAwsKmsAccount.js"; import { TEST_CLIENT } from "../shared/client.ts"; -import { getAwsKmsAccount } from "../../src/server/utils/wallets/getAwsKmsAccount"; -import { TEST_AWS_KMS_CONFIG } from "../shared/aws-kms.ts"; let account: Awaited>; diff --git a/tests/unit/gcp-kms.test.ts b/src/tests/wallets/gcp-kms.test.ts similarity index 94% rename from tests/unit/gcp-kms.test.ts rename to src/tests/wallets/gcp-kms.test.ts index 1f2d183cc..afc4feffb 100644 --- a/tests/unit/gcp-kms.test.ts +++ b/src/tests/wallets/gcp-kms.test.ts @@ -1,7 +1,9 @@ import { beforeAll, expect, test, vi } from "vitest"; import { ANVIL_CHAIN, anvilTestClient } from "../shared/chain.ts"; + import { typedData } from "../shared/typed-data.ts"; + import { verifyTypedData } from "thirdweb"; import { verifyEOASignature } from "thirdweb/auth"; import { @@ -10,9 +12,9 @@ import { } from "thirdweb/transaction"; import { toUnits, toWei } from "thirdweb/utils"; import { getWalletBalance } from "thirdweb/wallets"; -import { getGcpKmsAccount } from "../../src/server/utils/wallets/getGcpKmsAccount"; -import { TEST_GCP_KMS_CONFIG } from "../shared/gcp-kms"; -import { TEST_CLIENT } from "../shared/client"; +import { getGcpKmsAccount } from "../../server/utils/wallets/getGcpKmsAccount.ts"; +import { TEST_GCP_KMS_CONFIG } from "../config/gcp-kms.ts"; +import { TEST_CLIENT } from "../shared/client.ts"; let account: Awaited>; diff --git a/src/shared/utils/account.ts b/src/utils/account.ts similarity index 93% rename from src/shared/utils/account.ts rename to src/utils/account.ts index ef3d83e68..0c8373f7d 100644 --- a/src/shared/utils/account.ts +++ b/src/utils/account.ts @@ -6,15 +6,15 @@ import { isSmartBackendWallet, type ParsedWalletDetails, } from "../db/wallets/getWalletDetails"; -import { WalletType } from "../schemas/wallet"; -import { splitAwsKmsArn } from "../../server/utils/wallets/awsKmsArn"; -import { getConnectedSmartWallet } from "../../server/utils/wallets/createSmartWallet"; -import { getAwsKmsAccount } from "../../server/utils/wallets/getAwsKmsAccount"; -import { getGcpKmsAccount } from "../../server/utils/wallets/getGcpKmsAccount"; +import { WalletType } from "../schema/wallet"; +import { splitAwsKmsArn } from "../server/utils/wallets/awsKmsArn"; +import { getConnectedSmartWallet } from "../server/utils/wallets/createSmartWallet"; +import { getAwsKmsAccount } from "../server/utils/wallets/getAwsKmsAccount"; +import { getGcpKmsAccount } from "../server/utils/wallets/getGcpKmsAccount"; import { encryptedJsonToAccount, getLocalWalletAccount, -} from "../../server/utils/wallets/getLocalWallet"; +} from "../server/utils/wallets/getLocalWallet"; import { getSmartWalletV5 } from "./cache/getSmartWalletV5"; import { getChain } from "./chain"; import { thirdwebClient } from "./sdk"; diff --git a/src/shared/utils/auth.ts b/src/utils/auth.ts similarity index 100% rename from src/shared/utils/auth.ts rename to src/utils/auth.ts diff --git a/src/shared/utils/block.ts b/src/utils/block.ts similarity index 100% rename from src/shared/utils/block.ts rename to src/utils/block.ts diff --git a/src/shared/utils/cache/accessToken.ts b/src/utils/cache/accessToken.ts similarity index 100% rename from src/shared/utils/cache/accessToken.ts rename to src/utils/cache/accessToken.ts diff --git a/src/shared/utils/cache/authWallet.ts b/src/utils/cache/authWallet.ts similarity index 100% rename from src/shared/utils/cache/authWallet.ts rename to src/utils/cache/authWallet.ts diff --git a/src/shared/utils/cache/clearCache.ts b/src/utils/cache/clearCache.ts similarity index 100% rename from src/shared/utils/cache/clearCache.ts rename to src/utils/cache/clearCache.ts diff --git a/src/shared/utils/cache/getConfig.ts b/src/utils/cache/getConfig.ts similarity index 86% rename from src/shared/utils/cache/getConfig.ts rename to src/utils/cache/getConfig.ts index f18937576..59b9850e9 100644 --- a/src/shared/utils/cache/getConfig.ts +++ b/src/utils/cache/getConfig.ts @@ -1,5 +1,5 @@ import { getConfiguration } from "../../db/configuration/getConfiguration"; -import type { ParsedConfig } from "../../schemas/config"; +import type { ParsedConfig } from "../../schema/config"; let _config: ParsedConfig | null = null; diff --git a/src/shared/utils/cache/getContract.ts b/src/utils/cache/getContract.ts similarity index 82% rename from src/shared/utils/cache/getContract.ts rename to src/utils/cache/getContract.ts index b9b4dcb51..4ace9a679 100644 --- a/src/shared/utils/cache/getContract.ts +++ b/src/utils/cache/getContract.ts @@ -1,7 +1,7 @@ -import { type Static, Type } from "@sinclair/typebox"; +import { Static, Type } from "@sinclair/typebox"; import { StatusCodes } from "http-status-codes"; -import { createCustomError } from "../../../server/middleware/error"; -import { abiSchema } from "../../../server/schemas/contract"; +import { createCustomError } from "../../server/middleware/error"; +import { abiSchema } from "../../server/schemas/contract"; import { getSdk } from "./getSdk"; const abiArraySchema = Type.Array(abiSchema); diff --git a/src/shared/utils/cache/getContractv5.ts b/src/utils/cache/getContractv5.ts similarity index 100% rename from src/shared/utils/cache/getContractv5.ts rename to src/utils/cache/getContractv5.ts diff --git a/src/shared/utils/cache/getSdk.ts b/src/utils/cache/getSdk.ts similarity index 97% rename from src/shared/utils/cache/getSdk.ts rename to src/utils/cache/getSdk.ts index f15781715..42c754610 100644 --- a/src/shared/utils/cache/getSdk.ts +++ b/src/utils/cache/getSdk.ts @@ -2,7 +2,7 @@ import { Type } from "@sinclair/typebox"; import { ThirdwebSDK } from "@thirdweb-dev/sdk"; import LRUMap from "mnemonist/lru-map"; import { getChainMetadata } from "thirdweb/chains"; -import { badChainError } from "../../../server/middleware/error"; +import { badChainError } from "../../server/middleware/error"; import { getChain } from "../chain"; import { env } from "../env"; import { getWallet } from "./getWallet"; diff --git a/src/shared/utils/cache/getSmartWalletV5.ts b/src/utils/cache/getSmartWalletV5.ts similarity index 100% rename from src/shared/utils/cache/getSmartWalletV5.ts rename to src/utils/cache/getSmartWalletV5.ts diff --git a/src/shared/utils/cache/getWallet.ts b/src/utils/cache/getWallet.ts similarity index 91% rename from src/shared/utils/cache/getWallet.ts rename to src/utils/cache/getWallet.ts index 520cf924f..6b078594b 100644 --- a/src/shared/utils/cache/getWallet.ts +++ b/src/utils/cache/getWallet.ts @@ -7,13 +7,13 @@ import { getWalletDetails, type ParsedWalletDetails, } from "../../db/wallets/getWalletDetails"; -import type { PrismaTransaction } from "../../schemas/prisma"; -import { WalletType } from "../../schemas/wallet"; -import { createCustomError } from "../../../server/middleware/error"; -import { splitAwsKmsArn } from "../../../server/utils/wallets/awsKmsArn"; -import { splitGcpKmsResourcePath } from "../../../server/utils/wallets/gcpKmsResourcePath"; -import { getLocalWallet } from "../../../server/utils/wallets/getLocalWallet"; -import { getSmartWallet } from "../../../server/utils/wallets/getSmartWallet"; +import type { PrismaTransaction } from "../../schema/prisma"; +import { WalletType } from "../../schema/wallet"; +import { createCustomError } from "../../server/middleware/error"; +import { splitAwsKmsArn } from "../../server/utils/wallets/awsKmsArn"; +import { splitGcpKmsResourcePath } from "../../server/utils/wallets/gcpKmsResourcePath"; +import { getLocalWallet } from "../../server/utils/wallets/getLocalWallet"; +import { getSmartWallet } from "../../server/utils/wallets/getSmartWallet"; export const walletsCache = new LRUMap(2048); diff --git a/src/shared/utils/cache/getWebhook.ts b/src/utils/cache/getWebhook.ts similarity index 91% rename from src/shared/utils/cache/getWebhook.ts rename to src/utils/cache/getWebhook.ts index 1ed9df187..ded5543df 100644 --- a/src/shared/utils/cache/getWebhook.ts +++ b/src/utils/cache/getWebhook.ts @@ -1,7 +1,7 @@ import type { Webhooks } from "@prisma/client"; import LRUMap from "mnemonist/lru-map"; import { getAllWebhooks } from "../../db/webhooks/getAllWebhooks"; -import type { WebhooksEventTypes } from "../../schemas/webhooks"; +import type { WebhooksEventTypes } from "../../schema/webhooks"; export const webhookCache = new LRUMap(2048); diff --git a/src/shared/utils/cache/keypair.ts b/src/utils/cache/keypair.ts similarity index 100% rename from src/shared/utils/cache/keypair.ts rename to src/utils/cache/keypair.ts diff --git a/src/shared/utils/chain.ts b/src/utils/chain.ts similarity index 100% rename from src/shared/utils/chain.ts rename to src/utils/chain.ts diff --git a/src/shared/utils/cron/clearCacheCron.ts b/src/utils/cron/clearCacheCron.ts similarity index 100% rename from src/shared/utils/cron/clearCacheCron.ts rename to src/utils/cron/clearCacheCron.ts diff --git a/src/shared/utils/cron/isValidCron.ts b/src/utils/cron/isValidCron.ts similarity index 96% rename from src/shared/utils/cron/isValidCron.ts rename to src/utils/cron/isValidCron.ts index abfdc5715..f0ea16ccf 100644 --- a/src/shared/utils/cron/isValidCron.ts +++ b/src/utils/cron/isValidCron.ts @@ -1,6 +1,6 @@ import cronParser from "cron-parser"; import { StatusCodes } from "http-status-codes"; -import { createCustomError } from "../../../server/middleware/error"; +import { createCustomError } from "../../server/middleware/error"; export const isValidCron = (input: string): boolean => { try { diff --git a/src/shared/utils/crypto.ts b/src/utils/crypto.ts similarity index 100% rename from src/shared/utils/crypto.ts rename to src/utils/crypto.ts diff --git a/src/shared/utils/date.ts b/src/utils/date.ts similarity index 100% rename from src/shared/utils/date.ts rename to src/utils/date.ts diff --git a/src/shared/utils/env.ts b/src/utils/env.ts similarity index 100% rename from src/shared/utils/env.ts rename to src/utils/env.ts diff --git a/src/shared/utils/error.ts b/src/utils/error.ts similarity index 100% rename from src/shared/utils/error.ts rename to src/utils/error.ts diff --git a/src/shared/utils/ethers.ts b/src/utils/ethers.ts similarity index 100% rename from src/shared/utils/ethers.ts rename to src/utils/ethers.ts diff --git a/src/shared/utils/indexer/getBlockTime.ts b/src/utils/indexer/getBlockTime.ts similarity index 100% rename from src/shared/utils/indexer/getBlockTime.ts rename to src/utils/indexer/getBlockTime.ts diff --git a/src/shared/utils/logger.ts b/src/utils/logger.ts similarity index 100% rename from src/shared/utils/logger.ts rename to src/utils/logger.ts diff --git a/src/shared/utils/math.ts b/src/utils/math.ts similarity index 100% rename from src/shared/utils/math.ts rename to src/utils/math.ts diff --git a/src/shared/utils/primitiveTypes.ts b/src/utils/primitiveTypes.ts similarity index 100% rename from src/shared/utils/primitiveTypes.ts rename to src/utils/primitiveTypes.ts diff --git a/src/shared/utils/prometheus.ts b/src/utils/prometheus.ts similarity index 98% rename from src/shared/utils/prometheus.ts rename to src/utils/prometheus.ts index dbada9ad4..abfb9b8e0 100644 --- a/src/shared/utils/prometheus.ts +++ b/src/utils/prometheus.ts @@ -1,7 +1,7 @@ import fastify from "fastify"; import { Counter, Gauge, Histogram, Registry } from "prom-client"; import { getUsedBackendWallets, inspectNonce } from "../db/wallets/walletNonce"; -import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; +import { getLastUsedOnchainNonce } from "../server/routes/admin/nonces"; const nonceMetrics = new Gauge({ name: "engine_nonces", diff --git a/src/shared/utils/redis/lock.ts b/src/utils/redis/lock.ts similarity index 100% rename from src/shared/utils/redis/lock.ts rename to src/utils/redis/lock.ts diff --git a/src/shared/utils/redis/redis.ts b/src/utils/redis/redis.ts similarity index 100% rename from src/shared/utils/redis/redis.ts rename to src/utils/redis/redis.ts diff --git a/src/shared/utils/sdk.ts b/src/utils/sdk.ts similarity index 100% rename from src/shared/utils/sdk.ts rename to src/utils/sdk.ts diff --git a/src/tracer.ts b/src/utils/tracer.ts similarity index 79% rename from src/tracer.ts rename to src/utils/tracer.ts index 4aae137e3..c07e15c1a 100644 --- a/src/tracer.ts +++ b/src/utils/tracer.ts @@ -1,5 +1,5 @@ import tracer from "dd-trace"; -import { env } from "./shared/utils/env"; +import { env } from "./env"; if (env.DD_TRACER_ACTIVATED) { tracer.init(); // initialized in a different file to avoid hoisting. diff --git a/src/shared/utils/transaction/cancelTransaction.ts b/src/utils/transaction/cancelTransaction.ts similarity index 100% rename from src/shared/utils/transaction/cancelTransaction.ts rename to src/utils/transaction/cancelTransaction.ts diff --git a/src/shared/utils/transaction/insertTransaction.ts b/src/utils/transaction/insertTransaction.ts similarity index 95% rename from src/shared/utils/transaction/insertTransaction.ts rename to src/utils/transaction/insertTransaction.ts index 5d4f33da4..fe79018fb 100644 --- a/src/shared/utils/transaction/insertTransaction.ts +++ b/src/utils/transaction/insertTransaction.ts @@ -1,14 +1,14 @@ import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; -import { TransactionDB } from "../../../shared/db/transactions/db"; +import { TransactionDB } from "../../db/transactions/db"; import { getWalletDetails, isSmartBackendWallet, type ParsedWalletDetails, -} from "../../../shared/db/wallets/getWalletDetails"; +} from "../../db/wallets/getWalletDetails"; import { doesChainSupportService } from "../../lib/chain/chain-capabilities"; -import { createCustomError } from "../../../server/middleware/error"; -import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; +import { createCustomError } from "../../server/middleware/error"; +import { SendTransactionQueue } from "../../worker/queues/sendTransactionQueue"; import { getChecksumAddress } from "../primitiveTypes"; import { recordMetrics } from "../prometheus"; import { reportUsage } from "../usage"; diff --git a/src/shared/utils/transaction/queueTransation.ts b/src/utils/transaction/queueTransation.ts similarity index 90% rename from src/shared/utils/transaction/queueTransation.ts rename to src/utils/transaction/queueTransation.ts index e883a83aa..cdaf2245d 100644 --- a/src/shared/utils/transaction/queueTransation.ts +++ b/src/utils/transaction/queueTransation.ts @@ -7,9 +7,9 @@ import { type PreparedTransaction, } from "thirdweb"; import { resolvePromisedValue } from "thirdweb/utils"; -import { createCustomError } from "../../../server/middleware/error"; -import type { txOverridesWithValueSchema } from "../../../server/schemas/txOverrides"; -import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; +import { createCustomError } from "../../server/middleware/error"; +import type { txOverridesWithValueSchema } from "../../server/schemas/txOverrides"; +import { parseTransactionOverrides } from "../../server/utils/transactionOverrides"; import { prettifyError } from "../error"; import { insertTransaction } from "./insertTransaction"; import type { InsertedTransaction } from "./types"; diff --git a/src/shared/utils/transaction/simulateQueuedTransaction.ts b/src/utils/transaction/simulateQueuedTransaction.ts similarity index 100% rename from src/shared/utils/transaction/simulateQueuedTransaction.ts rename to src/utils/transaction/simulateQueuedTransaction.ts diff --git a/src/shared/utils/transaction/types.ts b/src/utils/transaction/types.ts similarity index 100% rename from src/shared/utils/transaction/types.ts rename to src/utils/transaction/types.ts diff --git a/src/shared/utils/transaction/webhook.ts b/src/utils/transaction/webhook.ts similarity index 80% rename from src/shared/utils/transaction/webhook.ts rename to src/utils/transaction/webhook.ts index 159844a9d..40cb71ed0 100644 --- a/src/shared/utils/transaction/webhook.ts +++ b/src/utils/transaction/webhook.ts @@ -1,5 +1,5 @@ -import { WebhooksEventTypes } from "../../schemas/webhooks"; -import { SendWebhookQueue } from "../../../worker/queues/sendWebhookQueue"; +import { WebhooksEventTypes } from "../../schema/webhooks"; +import { SendWebhookQueue } from "../../worker/queues/sendWebhookQueue"; import type { AnyTransaction } from "./types"; export const enqueueTransactionWebhook = async ( diff --git a/src/shared/utils/usage.ts b/src/utils/usage.ts similarity index 86% rename from src/shared/utils/usage.ts rename to src/utils/usage.ts index 97de003e3..002c437c8 100644 --- a/src/shared/utils/usage.ts +++ b/src/utils/usage.ts @@ -1,12 +1,12 @@ -import type { Static } from "@sinclair/typebox"; -import type { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; -import type { FastifyInstance } from "fastify"; -import type { Address, Hex } from "thirdweb"; -import { ADMIN_QUEUES_BASEPATH } from "../../server/middleware/adminRoutes"; -import { OPENAPI_ROUTES } from "../../server/middleware/openApi"; -import type { contractParamSchema } from "../../server/schemas/sharedApiSchemas"; -import type { walletWithAddressParamSchema } from "../../server/schemas/wallet"; -import { getChainIdFromChain } from "../../server/utils/chain"; +import { Static } from "@sinclair/typebox"; +import { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; +import { FastifyInstance } from "fastify"; +import { Address, Hex } from "thirdweb"; +import { ADMIN_QUEUES_BASEPATH } from "../server/middleware/adminRoutes"; +import { OPENAPI_ROUTES } from "../server/middleware/openApi"; +import { contractParamSchema } from "../server/schemas/sharedApiSchemas"; +import { walletWithAddressParamSchema } from "../server/schemas/wallet"; +import { getChainIdFromChain } from "../server/utils/chain"; import { env } from "./env"; import { logger } from "./logger"; import { thirdwebClientId } from "./sdk"; diff --git a/src/shared/utils/webhook.ts b/src/utils/webhook.ts similarity index 100% rename from src/shared/utils/webhook.ts rename to src/utils/webhook.ts diff --git a/src/worker/indexers/chainIndexerRegistry.ts b/src/worker/indexers/chainIndexerRegistry.ts index 760b556f1..df37adde8 100644 --- a/src/worker/indexers/chainIndexerRegistry.ts +++ b/src/worker/indexers/chainIndexerRegistry.ts @@ -1,6 +1,6 @@ import cron from "node-cron"; -import { getBlockTimeSeconds } from "../../shared/utils/indexer/getBlockTime"; -import { logger } from "../../shared/utils/logger"; +import { getBlockTimeSeconds } from "../../utils/indexer/getBlockTime"; +import { logger } from "../../utils/logger"; import { handleContractSubscriptions } from "../tasks/chainIndexer"; // @TODO: Move all worker logic to Bullmq to better handle multiple hosts. diff --git a/src/worker/listeners/chainIndexerListener.ts b/src/worker/listeners/chainIndexerListener.ts index 186aee895..e7be532dc 100644 --- a/src/worker/listeners/chainIndexerListener.ts +++ b/src/worker/listeners/chainIndexerListener.ts @@ -1,6 +1,6 @@ import cron from "node-cron"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { logger } from "../../shared/utils/logger"; +import { getConfig } from "../../utils/cache/getConfig"; +import { logger } from "../../utils/logger"; import { manageChainIndexers } from "../tasks/manageChainIndexers"; let processChainIndexerStarted = false; diff --git a/src/worker/listeners/configListener.ts b/src/worker/listeners/configListener.ts index 62594280d..48213c731 100644 --- a/src/worker/listeners/configListener.ts +++ b/src/worker/listeners/configListener.ts @@ -1,7 +1,7 @@ -import { knex } from "../../shared/db/client"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { clearCacheCron } from "../../shared/utils/cron/clearCacheCron"; -import { logger } from "../../shared/utils/logger"; +import { knex } from "../../db/client"; +import { getConfig } from "../../utils/cache/getConfig"; +import { clearCacheCron } from "../../utils/cron/clearCacheCron"; +import { logger } from "../../utils/logger"; import { chainIndexerListener } from "./chainIndexerListener"; export const newConfigurationListener = async (): Promise => { diff --git a/src/worker/listeners/webhookListener.ts b/src/worker/listeners/webhookListener.ts index d1ab64e18..2ab19ba2f 100644 --- a/src/worker/listeners/webhookListener.ts +++ b/src/worker/listeners/webhookListener.ts @@ -1,6 +1,6 @@ -import { knex } from "../../shared/db/client"; -import { webhookCache } from "../../shared/utils/cache/getWebhook"; -import { logger } from "../../shared/utils/logger"; +import { knex } from "../../db/client"; +import { webhookCache } from "../../utils/cache/getWebhook"; +import { logger } from "../../utils/logger"; export const newWebhooksListener = async (): Promise => { logger({ diff --git a/src/worker/queues/cancelRecycledNoncesQueue.ts b/src/worker/queues/cancelRecycledNoncesQueue.ts index 28bc4fde9..ff2991d52 100644 --- a/src/worker/queues/cancelRecycledNoncesQueue.ts +++ b/src/worker/queues/cancelRecycledNoncesQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../shared/utils/redis/redis"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class CancelRecycledNoncesQueue { diff --git a/src/worker/queues/migratePostgresTransactionsQueue.ts b/src/worker/queues/migratePostgresTransactionsQueue.ts index b24498c6d..5e3100080 100644 --- a/src/worker/queues/migratePostgresTransactionsQueue.ts +++ b/src/worker/queues/migratePostgresTransactionsQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../shared/utils/redis/redis"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class MigratePostgresTransactionsQueue { diff --git a/src/worker/queues/mineTransactionQueue.ts b/src/worker/queues/mineTransactionQueue.ts index f3a0f09ba..e35627272 100644 --- a/src/worker/queues/mineTransactionQueue.ts +++ b/src/worker/queues/mineTransactionQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { redis } from "../../shared/utils/redis/redis"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type MineTransactionData = { diff --git a/src/worker/queues/nonceHealthCheckQueue.ts b/src/worker/queues/nonceHealthCheckQueue.ts index 80ddf5453..31795e7ec 100644 --- a/src/worker/queues/nonceHealthCheckQueue.ts +++ b/src/worker/queues/nonceHealthCheckQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../shared/utils/redis/redis"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class NonceHealthCheckQueue { diff --git a/src/worker/queues/nonceResyncQueue.ts b/src/worker/queues/nonceResyncQueue.ts index 59ca44b65..23fbf22bc 100644 --- a/src/worker/queues/nonceResyncQueue.ts +++ b/src/worker/queues/nonceResyncQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../shared/utils/redis/redis"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class NonceResyncQueue { diff --git a/src/worker/queues/processEventLogsQueue.ts b/src/worker/queues/processEventLogsQueue.ts index de3c97a0d..1c32ad36f 100644 --- a/src/worker/queues/processEventLogsQueue.ts +++ b/src/worker/queues/processEventLogsQueue.ts @@ -1,8 +1,8 @@ import { Queue } from "bullmq"; import SuperJSON from "superjson"; -import type { Address } from "thirdweb"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { redis } from "../../shared/utils/redis/redis"; +import { Address } from "thirdweb"; +import { getConfig } from "../../utils/cache/getConfig"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; // Each job handles a block range for a given chain, filtered by addresses + events. diff --git a/src/worker/queues/processTransactionReceiptsQueue.ts b/src/worker/queues/processTransactionReceiptsQueue.ts index 6ee7c7557..0f595e73f 100644 --- a/src/worker/queues/processTransactionReceiptsQueue.ts +++ b/src/worker/queues/processTransactionReceiptsQueue.ts @@ -1,8 +1,8 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import type { Address } from "thirdweb"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { redis } from "../../shared/utils/redis/redis"; +import { Address } from "thirdweb"; +import { getConfig } from "../../utils/cache/getConfig"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; // Each job handles a block range for a given chain, filtered by addresses + events. diff --git a/src/worker/queues/pruneTransactionsQueue.ts b/src/worker/queues/pruneTransactionsQueue.ts index 5786346cd..717162f77 100644 --- a/src/worker/queues/pruneTransactionsQueue.ts +++ b/src/worker/queues/pruneTransactionsQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../shared/utils/redis/redis"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class PruneTransactionsQueue { diff --git a/src/worker/queues/queues.ts b/src/worker/queues/queues.ts index 6331d3a8d..d22534c37 100644 --- a/src/worker/queues/queues.ts +++ b/src/worker/queues/queues.ts @@ -1,6 +1,6 @@ import type { Job, JobsOptions, Worker } from "bullmq"; -import { env } from "../../shared/utils/env"; -import { logger } from "../../shared/utils/logger"; +import { env } from "../../utils/env"; +import { logger } from "../../utils/logger"; export const defaultJobOptions: JobsOptions = { // Does not retry by default. Queues must explicitly define their own retry count and backoff behavior. diff --git a/src/worker/queues/sendTransactionQueue.ts b/src/worker/queues/sendTransactionQueue.ts index 4f4db261b..ba93068b8 100644 --- a/src/worker/queues/sendTransactionQueue.ts +++ b/src/worker/queues/sendTransactionQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { redis } from "../../shared/utils/redis/redis"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type SendTransactionData = { diff --git a/src/worker/queues/sendWebhookQueue.ts b/src/worker/queues/sendWebhookQueue.ts index a39bb7468..1861e4375 100644 --- a/src/worker/queues/sendWebhookQueue.ts +++ b/src/worker/queues/sendWebhookQueue.ts @@ -8,10 +8,10 @@ import SuperJSON from "superjson"; import { WebhooksEventTypes, type BackendWalletBalanceWebhookParams, -} from "../../shared/schemas/webhooks"; -import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; -import { logger } from "../../shared/utils/logger"; -import { redis } from "../../shared/utils/redis/redis"; +} from "../../schema/webhooks"; +import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; +import { logger } from "../../utils/logger"; +import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type EnqueueContractSubscriptionWebhookData = { diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancelRecycledNoncesWorker.ts index 2fa58212a..6b8b6a125 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancelRecycledNoncesWorker.ts @@ -1,10 +1,10 @@ -import { type Job, type Processor, Worker } from "bullmq"; -import type { Address } from "thirdweb"; -import { recycleNonce } from "../../shared/db/wallets/walletNonce"; -import { isNonceAlreadyUsedError } from "../../shared/utils/error"; -import { logger } from "../../shared/utils/logger"; -import { redis } from "../../shared/utils/redis/redis"; -import { sendCancellationTransaction } from "../../shared/utils/transaction/cancelTransaction"; +import { Job, Processor, Worker } from "bullmq"; +import { Address } from "thirdweb"; +import { recycleNonce } from "../../db/wallets/walletNonce"; +import { isNonceAlreadyUsedError } from "../../utils/error"; +import { logger } from "../../utils/logger"; +import { redis } from "../../utils/redis/redis"; +import { sendCancellationTransaction } from "../../utils/transaction/cancelTransaction"; import { CancelRecycledNoncesQueue } from "../queues/cancelRecycledNoncesQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chainIndexer.ts index 41bf92288..a7fbcc304 100644 --- a/src/worker/tasks/chainIndexer.ts +++ b/src/worker/tasks/chainIndexer.ts @@ -4,13 +4,13 @@ import { getRpcClient, type Address, } from "thirdweb"; -import { getBlockForIndexing } from "../../shared/db/chainIndexers/getChainIndexer"; -import { upsertChainIndexer } from "../../shared/db/chainIndexers/upsertChainIndexer"; -import { prisma } from "../../shared/db/client"; -import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; -import { getChain } from "../../shared/utils/chain"; -import { logger } from "../../shared/utils/logger"; -import { thirdwebClient } from "../../shared/utils/sdk"; +import { getBlockForIndexing } from "../../db/chainIndexers/getChainIndexer"; +import { upsertChainIndexer } from "../../db/chainIndexers/upsertChainIndexer"; +import { prisma } from "../../db/client"; +import { getContractSubscriptionsByChainId } from "../../db/contractSubscriptions/getContractSubscriptions"; +import { getChain } from "../../utils/chain"; +import { logger } from "../../utils/logger"; +import { thirdwebClient } from "../../utils/sdk"; import { ProcessEventsLogQueue } from "../queues/processEventLogsQueue"; import { ProcessTransactionReceiptsQueue } from "../queues/processTransactionReceiptsQueue"; diff --git a/src/worker/tasks/manageChainIndexers.ts b/src/worker/tasks/manageChainIndexers.ts index 787f88116..741562ee7 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 "../../db/contractSubscriptions/getContractSubscriptions"; import { INDEXER_REGISTRY, addChainIndexer, diff --git a/src/worker/tasks/migratePostgresTransactionsWorker.ts b/src/worker/tasks/migratePostgresTransactionsWorker.ts index fb3b3c4e2..7547d9b75 100644 --- a/src/worker/tasks/migratePostgresTransactionsWorker.ts +++ b/src/worker/tasks/migratePostgresTransactionsWorker.ts @@ -2,20 +2,17 @@ import type { Transactions } from "@prisma/client"; import { Worker, type Job, type Processor } from "bullmq"; import assert from "node:assert"; import type { Hex } from "thirdweb"; -import { getPrismaWithPostgresTx, prisma } from "../../shared/db/client"; -import { TransactionDB } from "../../shared/db/transactions/db"; -import type { PrismaTransaction } from "../../shared/schemas/prisma"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { logger } from "../../shared/utils/logger"; -import { - maybeBigInt, - normalizeAddress, -} from "../../shared/utils/primitiveTypes"; -import { redis } from "../../shared/utils/redis/redis"; +import { getPrismaWithPostgresTx, prisma } from "../../db/client"; +import { TransactionDB } from "../../db/transactions/db"; +import type { PrismaTransaction } from "../../schema/prisma"; +import { getConfig } from "../../utils/cache/getConfig"; +import { logger } from "../../utils/logger"; +import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; +import { redis } from "../../utils/redis/redis"; import type { QueuedTransaction, SentTransaction, -} from "../../shared/utils/transaction/types"; +} from "../../utils/transaction/types"; import { MigratePostgresTransactionsQueue } from "../queues/migratePostgresTransactionsQueue"; import { MineTransactionQueue } from "../queues/mineTransactionQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index b8facc1fa..1d3ce45f9 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -10,34 +10,31 @@ import { } from "thirdweb"; import { stringify } from "thirdweb/utils"; import { getUserOpReceipt } from "thirdweb/wallets/smart"; -import { TransactionDB } from "../../shared/db/transactions/db"; -import { - recycleNonce, - removeSentNonce, -} from "../../shared/db/wallets/walletNonce"; +import { TransactionDB } from "../../db/transactions/db"; +import { recycleNonce, removeSentNonce } from "../../db/wallets/walletNonce"; import { getReceiptForEOATransaction, getReceiptForUserOp, -} from "../../shared/lib/transaction/get-transaction-receipt"; -import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; -import { getBlockNumberish } from "../../shared/utils/block"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; -import { getChain } from "../../shared/utils/chain"; -import { msSince } from "../../shared/utils/date"; -import { env } from "../../shared/utils/env"; -import { prettifyError } from "../../shared/utils/error"; -import { logger } from "../../shared/utils/logger"; -import { recordMetrics } from "../../shared/utils/prometheus"; -import { redis } from "../../shared/utils/redis/redis"; -import { thirdwebClient } from "../../shared/utils/sdk"; +} from "../../lib/transaction/get-transaction-receipt"; +import { WebhooksEventTypes } from "../../schema/webhooks"; +import { getBlockNumberish } from "../../utils/block"; +import { getConfig } from "../../utils/cache/getConfig"; +import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; +import { getChain } from "../../utils/chain"; +import { msSince } from "../../utils/date"; +import { env } from "../../utils/env"; +import { prettifyError } from "../../utils/error"; +import { logger } from "../../utils/logger"; +import { recordMetrics } from "../../utils/prometheus"; +import { redis } from "../../utils/redis/redis"; +import { thirdwebClient } from "../../utils/sdk"; import type { ErroredTransaction, MinedTransaction, SentTransaction, -} from "../../shared/utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../shared/utils/transaction/webhook"; -import { reportUsage } from "../../shared/utils/usage"; +} from "../../utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../utils/transaction/webhook"; +import { reportUsage } from "../../utils/usage"; import { MineTransactionQueue, type MineTransactionData, diff --git a/src/worker/tasks/nonceHealthCheckWorker.ts b/src/worker/tasks/nonceHealthCheckWorker.ts index 2c2ab63a3..4d528c0c8 100644 --- a/src/worker/tasks/nonceHealthCheckWorker.ts +++ b/src/worker/tasks/nonceHealthCheckWorker.ts @@ -3,10 +3,10 @@ import { getAddress, type Address } from "thirdweb"; import { getUsedBackendWallets, inspectNonce, -} from "../../shared/db/wallets/walletNonce"; +} from "../../db/wallets/walletNonce"; import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; -import { logger } from "../../shared/utils/logger"; -import { redis } from "../../shared/utils/redis/redis"; +import { logger } from "../../utils/logger"; +import { redis } from "../../utils/redis/redis"; import { NonceHealthCheckQueue } from "../queues/nonceHealthCheckQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonceResyncWorker.ts index 144390076..8f5cb0c65 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -5,13 +5,13 @@ import { isSentNonce, recycleNonce, splitSentNoncesKey, -} from "../../shared/db/wallets/walletNonce"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { getChain } from "../../shared/utils/chain"; -import { prettifyError } from "../../shared/utils/error"; -import { logger } from "../../shared/utils/logger"; -import { redis } from "../../shared/utils/redis/redis"; -import { thirdwebClient } from "../../shared/utils/sdk"; +} from "../../db/wallets/walletNonce"; +import { getConfig } from "../../utils/cache/getConfig"; +import { getChain } from "../../utils/chain"; +import { prettifyError } from "../../utils/error"; +import { logger } from "../../utils/logger"; +import { redis } from "../../utils/redis/redis"; +import { thirdwebClient } from "../../utils/sdk"; import { NonceResyncQueue } from "../queues/nonceResyncQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index b1fd0c357..b3ad7c5fa 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -15,16 +15,16 @@ 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 { WebhooksEventTypes } from "../../shared/schemas/webhooks"; -import { getChain } from "../../shared/utils/chain"; -import { logger } from "../../shared/utils/logger"; -import { normalizeAddress } from "../../shared/utils/primitiveTypes"; -import { redis } from "../../shared/utils/redis/redis"; -import { thirdwebClient } from "../../shared/utils/sdk"; +import { bulkInsertContractEventLogs } from "../../db/contractEventLogs/createContractEventLogs"; +import { getContractSubscriptionsByChainId } from "../../db/contractSubscriptions/getContractSubscriptions"; +import { WebhooksEventTypes } from "../../schema/webhooks"; +import { getChain } from "../../utils/chain"; +import { logger } from "../../utils/logger"; +import { normalizeAddress } from "../../utils/primitiveTypes"; +import { redis } from "../../utils/redis/redis"; +import { thirdwebClient } from "../../utils/sdk"; import { - type EnqueueProcessEventLogsData, + EnqueueProcessEventLogsData, ProcessEventsLogQueue, } from "../queues/processEventLogsQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index 5bfb4e5a0..d8cdb23ae 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -12,19 +12,20 @@ import { } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { decodeFunctionData, type Abi, type Hash } from "viem"; -import { bulkInsertContractTransactionReceipts } from "../../shared/db/contractTransactionReceipts/createContractTransactionReceipts"; -import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; -import { getChain } from "../../shared/utils/chain"; -import { logger } from "../../shared/utils/logger"; -import { normalizeAddress } from "../../shared/utils/primitiveTypes"; -import { redis } from "../../shared/utils/redis/redis"; -import { thirdwebClient } from "../../shared/utils/sdk"; +import { bulkInsertContractTransactionReceipts } from "../../db/contractTransactionReceipts/createContractTransactionReceipts"; +import { WebhooksEventTypes } from "../../schema/webhooks"; +import { getChain } from "../../utils/chain"; +import { logger } from "../../utils/logger"; +import { normalizeAddress } from "../../utils/primitiveTypes"; +import { redis } from "../../utils/redis/redis"; +import { thirdwebClient } from "../../utils/sdk"; import { ProcessTransactionReceiptsQueue, type EnqueueProcessTransactionReceiptsData, } from "../queues/processTransactionReceiptsQueue"; import { logWorkerExceptions } from "../queues/queues"; import { SendWebhookQueue } from "../queues/sendWebhookQueue"; +import { getContractId } from "../utils/contractId"; import { getWebhooksByContractAddresses } from "./processEventLogsWorker"; const handler: Processor = async (job: Job) => { @@ -227,6 +228,3 @@ export const initProcessTransactionReceiptsWorker = () => { }); logWorkerExceptions(_worker); }; - -const getContractId = (chainId: number, contractAddress: string) => - `${chainId}:${contractAddress}`; diff --git a/src/worker/tasks/pruneTransactionsWorker.ts b/src/worker/tasks/pruneTransactionsWorker.ts index d736c23f3..9ba8a361a 100644 --- a/src/worker/tasks/pruneTransactionsWorker.ts +++ b/src/worker/tasks/pruneTransactionsWorker.ts @@ -1,8 +1,8 @@ import { Worker, type Job, type Processor } from "bullmq"; -import { TransactionDB } from "../../shared/db/transactions/db"; -import { pruneNonceMaps } from "../../shared/db/wallets/nonceMap"; -import { env } from "../../shared/utils/env"; -import { redis } from "../../shared/utils/redis/redis"; +import { TransactionDB } from "../../db/transactions/db"; +import { pruneNonceMaps } from "../../db/wallets/nonceMap"; +import { env } from "../../utils/env"; +import { redis } from "../../utils/redis/redis"; import { PruneTransactionsQueue } from "../queues/pruneTransactionsQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 65c810733..783530ba0 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -18,39 +18,39 @@ import { type UserOperation, } from "thirdweb/wallets/smart"; import { getContractAddress } from "viem"; -import { TransactionDB } from "../../shared/db/transactions/db"; +import { TransactionDB } from "../../db/transactions/db"; import { acquireNonce, addSentNonce, recycleNonce, syncLatestNonceFromOnchainIfHigher, -} from "../../shared/db/wallets/walletNonce"; +} from "../../db/wallets/walletNonce"; import { getAccount, getSmartBackendWalletAdminAccount, -} from "../../shared/utils/account"; -import { getBlockNumberish } from "../../shared/utils/block"; -import { getChain } from "../../shared/utils/chain"; -import { msSince } from "../../shared/utils/date"; -import { env } from "../../shared/utils/env"; +} from "../../utils/account"; +import { getBlockNumberish } from "../../utils/block"; +import { getChain } from "../../utils/chain"; +import { msSince } from "../../utils/date"; +import { env } from "../../utils/env"; import { isInsufficientFundsError, isNonceAlreadyUsedError, isReplacementGasFeeTooLow, wrapError, -} from "../../shared/utils/error"; -import { getChecksumAddress } from "../../shared/utils/primitiveTypes"; -import { recordMetrics } from "../../shared/utils/prometheus"; -import { redis } from "../../shared/utils/redis/redis"; -import { thirdwebClient } from "../../shared/utils/sdk"; +} from "../../utils/error"; +import { getChecksumAddress } from "../../utils/primitiveTypes"; +import { recordMetrics } from "../../utils/prometheus"; +import { redis } from "../../utils/redis/redis"; +import { thirdwebClient } from "../../utils/sdk"; import type { ErroredTransaction, PopulatedTransaction, QueuedTransaction, SentTransaction, -} from "../../shared/utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../shared/utils/transaction/webhook"; -import { reportUsage } from "../../shared/utils/usage"; +} from "../../utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../utils/transaction/webhook"; +import { reportUsage } from "../../utils/usage"; import { MineTransactionQueue } from "../queues/mineTransactionQueue"; import { logWorkerExceptions } from "../queues/queues"; import { diff --git a/src/worker/tasks/sendWebhookWorker.ts b/src/worker/tasks/sendWebhookWorker.ts index bd62edc40..a8cf60c23 100644 --- a/src/worker/tasks/sendWebhookWorker.ts +++ b/src/worker/tasks/sendWebhookWorker.ts @@ -1,23 +1,20 @@ import type { Static } from "@sinclair/typebox"; import { Worker, type Job, type Processor } from "bullmq"; import superjson from "superjson"; -import { TransactionDB } from "../../shared/db/transactions/db"; +import { TransactionDB } from "../../db/transactions/db"; import { WebhooksEventTypes, type BackendWalletBalanceWebhookParams, -} from "../../shared/schemas/webhooks"; +} from "../../schema/webhooks"; import { toEventLogSchema } from "../../server/schemas/eventLog"; import { toTransactionSchema, type TransactionSchema, } from "../../server/schemas/transaction"; import { toTransactionReceiptSchema } from "../../server/schemas/transactionReceipt"; -import { logger } from "../../shared/utils/logger"; -import { redis } from "../../shared/utils/redis/redis"; -import { - sendWebhookRequest, - type WebhookResponse, -} from "../../shared/utils/webhook"; +import { logger } from "../../utils/logger"; +import { redis } from "../../utils/redis/redis"; +import { sendWebhookRequest, type WebhookResponse } from "../../utils/webhook"; import { SendWebhookQueue, type WebhookJob } from "../queues/sendWebhookQueue"; const handler: Processor = async (job: Job) => { diff --git a/src/worker/utils/contractId.ts b/src/worker/utils/contractId.ts new file mode 100644 index 000000000..6cf991fca --- /dev/null +++ b/src/worker/utils/contractId.ts @@ -0,0 +1,2 @@ +export const getContractId = (chainId: number, contractAddress: string) => + `${chainId}:${contractAddress}`; diff --git a/src/worker/utils/nonce.ts b/src/worker/utils/nonce.ts new file mode 100644 index 000000000..d225ae87b --- /dev/null +++ b/src/worker/utils/nonce.ts @@ -0,0 +1,25 @@ +import { BigNumber } from "ethers"; +import { concat, toHex } from "viem"; + +const generateRandomUint192 = (): bigint => { + const rand1 = BigInt(Math.floor(Math.random() * 0x100000000)); + const rand2 = BigInt(Math.floor(Math.random() * 0x100000000)); + const rand3 = BigInt(Math.floor(Math.random() * 0x100000000)); + const rand4 = BigInt(Math.floor(Math.random() * 0x100000000)); + const rand5 = BigInt(Math.floor(Math.random() * 0x100000000)); + const rand6 = BigInt(Math.floor(Math.random() * 0x100000000)); + return ( + (rand1 << 160n) | + (rand2 << 128n) | + (rand3 << 96n) | + (rand4 << 64n) | + (rand5 << 32n) | + rand6 + ); +}; + +export const randomNonce = () => { + return BigNumber.from( + concat([toHex(generateRandomUint192()), "0x0000000000000000"]), + ); +}; diff --git a/tests/e2e/.env.test.example b/test/e2e/.env.test.example similarity index 100% rename from tests/e2e/.env.test.example rename to test/e2e/.env.test.example diff --git a/tests/e2e/.gitignore b/test/e2e/.gitignore similarity index 100% rename from tests/e2e/.gitignore rename to test/e2e/.gitignore diff --git a/tests/e2e/README.md b/test/e2e/README.md similarity index 100% rename from tests/e2e/README.md rename to test/e2e/README.md diff --git a/tests/e2e/bun.lockb b/test/e2e/bun.lockb similarity index 100% rename from tests/e2e/bun.lockb rename to test/e2e/bun.lockb diff --git a/tests/e2e/config.ts b/test/e2e/config.ts similarity index 100% rename from tests/e2e/config.ts rename to test/e2e/config.ts diff --git a/tests/e2e/package.json b/test/e2e/package.json similarity index 100% rename from tests/e2e/package.json rename to test/e2e/package.json diff --git a/tests/e2e/scripts/counter.ts b/test/e2e/scripts/counter.ts similarity index 90% rename from tests/e2e/scripts/counter.ts rename to test/e2e/scripts/counter.ts index b0c40f50e..ccb9bd8de 100644 --- a/tests/e2e/scripts/counter.ts +++ b/test/e2e/scripts/counter.ts @@ -2,8 +2,8 @@ // You can save the output to a file and then use this script to count the number of times a specific RPC call is made. import { argv } from "bun"; -import { readFile } from "node:fs/promises"; -import { join } from "node:path"; +import { readFile } from "fs/promises"; +import { join } from "path"; const file = join(__dirname, argv[2]); diff --git a/tests/e2e/tests/extensions.test.ts b/test/e2e/tests/extensions.test.ts similarity index 98% rename from tests/e2e/tests/extensions.test.ts rename to test/e2e/tests/extensions.test.ts index ed0674da8..1126f2877 100644 --- a/tests/e2e/tests/extensions.test.ts +++ b/test/e2e/tests/extensions.test.ts @@ -1,4 +1,4 @@ -import assert from "node:assert"; +import assert from "assert"; import { sleep } from "bun"; import { beforeAll, describe, expect, test } from "bun:test"; import { getAddress, type Address } from "viem"; diff --git a/tests/e2e/tests/load.test.ts b/test/e2e/tests/load.test.ts similarity index 98% rename from tests/e2e/tests/load.test.ts rename to test/e2e/tests/load.test.ts index 0cdea6317..1e31a2e4b 100644 --- a/tests/e2e/tests/load.test.ts +++ b/test/e2e/tests/load.test.ts @@ -1,4 +1,4 @@ -import assert from "node:assert"; +import assert from "assert"; import { sleep } from "bun"; import { describe, expect, test } from "bun:test"; import { getAddress } from "viem"; diff --git a/tests/e2e/tests/read.test.ts b/test/e2e/tests/read.test.ts similarity index 99% rename from tests/e2e/tests/read.test.ts rename to test/e2e/tests/read.test.ts index 25acbc951..7be048956 100644 --- a/tests/e2e/tests/read.test.ts +++ b/test/e2e/tests/read.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import { sepolia } from "thirdweb/chains"; -import type { ApiError } from "../../../sdk/dist/thirdweb-dev-engine.cjs.js"; +import type { ApiError } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; import type { setupEngine } from "../utils/engine"; import { setup } from "./setup"; diff --git a/tests/e2e/tests/routes/erc1155-transfer.test.ts b/test/e2e/tests/routes/erc1155-transfer.test.ts similarity index 100% rename from tests/e2e/tests/routes/erc1155-transfer.test.ts rename to test/e2e/tests/routes/erc1155-transfer.test.ts diff --git a/tests/e2e/tests/routes/erc20-transfer.test.ts b/test/e2e/tests/routes/erc20-transfer.test.ts similarity index 99% rename from tests/e2e/tests/routes/erc20-transfer.test.ts rename to test/e2e/tests/routes/erc20-transfer.test.ts index 867e1d43b..7a22c149e 100644 --- a/tests/e2e/tests/routes/erc20-transfer.test.ts +++ b/test/e2e/tests/routes/erc20-transfer.test.ts @@ -4,7 +4,7 @@ import { ZERO_ADDRESS, toWei, type Address } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; -import { setup } from "../setup"; +import { setup } from "./../setup"; describe("ERC20 transfer", () => { let tokenContractAddress: string; diff --git a/tests/e2e/tests/routes/erc721-transfer.test.ts b/test/e2e/tests/routes/erc721-transfer.test.ts similarity index 100% rename from tests/e2e/tests/routes/erc721-transfer.test.ts rename to test/e2e/tests/routes/erc721-transfer.test.ts diff --git a/tests/e2e/tests/routes/signMessage.test.ts b/test/e2e/tests/routes/signMessage.test.ts similarity index 100% rename from tests/e2e/tests/routes/signMessage.test.ts rename to test/e2e/tests/routes/signMessage.test.ts diff --git a/tests/e2e/tests/routes/signaturePrepare.test.ts b/test/e2e/tests/routes/signaturePrepare.test.ts similarity index 100% rename from tests/e2e/tests/routes/signaturePrepare.test.ts rename to test/e2e/tests/routes/signaturePrepare.test.ts diff --git a/tests/e2e/tests/routes/write.test.ts b/test/e2e/tests/routes/write.test.ts similarity index 97% rename from tests/e2e/tests/routes/write.test.ts rename to test/e2e/tests/routes/write.test.ts index 68e9db9de..d891055d6 100644 --- a/tests/e2e/tests/routes/write.test.ts +++ b/test/e2e/tests/routes/write.test.ts @@ -3,10 +3,10 @@ import assert from "node:assert"; import { stringToHex, type Address } from "thirdweb"; import { zeroAddress } from "viem"; import type { ApiError } from "../../../../sdk/dist/thirdweb-dev-engine.cjs.js"; -import { CONFIG } from "../../config.js"; -import type { setupEngine } from "../../utils/engine.js"; -import { pollTransactionStatus } from "../../utils/transactions.js"; -import { setup } from "../setup.js"; +import { CONFIG } from "../../config"; +import type { setupEngine } from "../../utils/engine"; +import { pollTransactionStatus } from "../../utils/transactions"; +import { setup } from "../setup"; describe("/contract/write route", () => { let tokenContractAddress: string; diff --git a/tests/e2e/tests/setup.ts b/test/e2e/tests/setup.ts similarity index 96% rename from tests/e2e/tests/setup.ts rename to test/e2e/tests/setup.ts index 0be24b7f7..c65b07e06 100644 --- a/tests/e2e/tests/setup.ts +++ b/test/e2e/tests/setup.ts @@ -25,7 +25,7 @@ export const setup = async (): Promise => { const engine = setupEngine(); const backendWallet = await getEngineBackendWallet(engine); - await engine.backendWallet.resetNonces({}); + await engine.backendWallet.resetNonces(); if (!env.THIRDWEB_API_SECRET_KEY) throw new Error("THIRDWEB_API_SECRET_KEY is not set"); diff --git a/tests/e2e/tests/sign-transaction.test.ts b/test/e2e/tests/sign-transaction.test.ts similarity index 100% rename from tests/e2e/tests/sign-transaction.test.ts rename to test/e2e/tests/sign-transaction.test.ts diff --git a/tests/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts b/test/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts similarity index 100% rename from tests/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts rename to test/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts diff --git a/tests/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts b/test/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts similarity index 100% rename from tests/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts rename to test/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts diff --git a/tests/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts b/test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts similarity index 100% rename from tests/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts rename to test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts diff --git a/tests/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts b/test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts similarity index 100% rename from tests/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts rename to test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts diff --git a/tests/e2e/tests/smoke.test.ts b/test/e2e/tests/smoke.test.ts similarity index 100% rename from tests/e2e/tests/smoke.test.ts rename to test/e2e/tests/smoke.test.ts diff --git a/tests/e2e/tests/userop.test.ts b/test/e2e/tests/userop.test.ts similarity index 98% rename from tests/e2e/tests/userop.test.ts rename to test/e2e/tests/userop.test.ts index 875231e67..18c5cba6d 100644 --- a/tests/e2e/tests/userop.test.ts +++ b/test/e2e/tests/userop.test.ts @@ -1,5 +1,5 @@ import { beforeAll, describe, expect, test } from "bun:test"; -import { randomBytes } from "node:crypto"; +import { randomBytes } from "crypto"; import { getAddress, type Address } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { DEFAULT_ACCOUNT_FACTORY_V0_6 } from "thirdweb/wallets/smart"; diff --git a/tests/e2e/tests/utils/getBlockTime.test.ts b/test/e2e/tests/utils/getBlockTime.test.ts similarity index 100% rename from tests/e2e/tests/utils/getBlockTime.test.ts rename to test/e2e/tests/utils/getBlockTime.test.ts diff --git a/tests/e2e/tsconfig.json b/test/e2e/tsconfig.json similarity index 100% rename from tests/e2e/tsconfig.json rename to test/e2e/tsconfig.json diff --git a/tests/e2e/utils/anvil.ts b/test/e2e/utils/anvil.ts similarity index 100% rename from tests/e2e/utils/anvil.ts rename to test/e2e/utils/anvil.ts diff --git a/tests/e2e/utils/engine.ts b/test/e2e/utils/engine.ts similarity index 95% rename from tests/e2e/utils/engine.ts rename to test/e2e/utils/engine.ts index b4bdede4f..53cb57be0 100644 --- a/tests/e2e/utils/engine.ts +++ b/test/e2e/utils/engine.ts @@ -1,5 +1,5 @@ import { checksumAddress } from "thirdweb/utils"; -import { Engine } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; +import { Engine } from "../../../sdk"; import { CONFIG } from "../config"; import { ANVIL_PKEY_A, ANVIL_PKEY_B } from "./wallets"; diff --git a/tests/e2e/utils/statistics.ts b/test/e2e/utils/statistics.ts similarity index 100% rename from tests/e2e/utils/statistics.ts rename to test/e2e/utils/statistics.ts diff --git a/tests/e2e/utils/transactions.ts b/test/e2e/utils/transactions.ts similarity index 95% rename from tests/e2e/utils/transactions.ts rename to test/e2e/utils/transactions.ts index 4f889d3a9..7e51b5a6c 100644 --- a/tests/e2e/utils/transactions.ts +++ b/test/e2e/utils/transactions.ts @@ -1,6 +1,6 @@ import { sleep } from "bun"; -import type { Address } from "viem"; -import type { Engine } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; +import { type Address } from "viem"; +import { Engine } from "../../../sdk"; import { CONFIG } from "../config"; type Timing = { diff --git a/tests/e2e/utils/wallets.ts b/test/e2e/utils/wallets.ts similarity index 100% rename from tests/e2e/utils/wallets.ts rename to test/e2e/utils/wallets.ts diff --git a/tsconfig.json b/tsconfig.json index 6fb9b351a..e708959bb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,5 +25,5 @@ "src/**/*.js", "src/**/*.d.ts" ], - "exclude": ["node_modules", "tests/tests/**/*.ts"] + "exclude": ["node_modules", "src/tests/**/*.ts"] } diff --git a/vitest.config.ts b/vitest.config.ts index d2f6a0cda..cfcdaf467 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,8 +2,9 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { - include: ["tests/unit/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], + include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], exclude: ["tests/e2e/**/*"], + // setupFiles: ["./vitest.setup.ts"], globalSetup: ["./vitest.global-setup.ts"], mockReset: true, }, diff --git a/vitest.global-setup.ts b/vitest.global-setup.ts index c09752690..53f215c91 100644 --- a/vitest.global-setup.ts +++ b/vitest.global-setup.ts @@ -5,19 +5,17 @@ config({ path: [path.resolve(".env.test.local"), path.resolve(".env.test")], }); -// import { createServer } from "prool"; -// import { anvil } from "prool/instances"; +import { createServer } from "prool"; +import { anvil } from "prool/instances"; -// export async function setup() { -// const server = createServer({ -// instance: anvil(), -// port: 8645, // Choose an appropriate port -// }); -// await server.start(); -// // Return a teardown function that will be called after all tests are complete -// return async () => { -// await server.stop(); -// }; -// } - -export async function setup() {} +export async function setup() { + const server = createServer({ + instance: anvil(), + port: 8645, // Choose an appropriate port + }); + await server.start(); + // Return a teardown function that will be called after all tests are complete + return async () => { + await server.stop(); + }; +} From a802d87a54530086821cc21cce6a90d7633da660 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Sun, 8 Dec 2024 10:27:57 +0800 Subject: [PATCH 27/44] fix: increase gas multiple on each resend attempt (#746) * fix: increase gas multiple on each resend attempt * fix clamp * update gas retry logic * remove clamp * unused vars * update gasPrice --- src/tests/sendTransactionWorker.test.ts | 84 +++++++++++++++++++++++ src/worker/tasks/sendTransactionWorker.ts | 63 +++++++++++++---- 2 files changed, 133 insertions(+), 14 deletions(-) create mode 100644 src/tests/sendTransactionWorker.test.ts diff --git a/src/tests/sendTransactionWorker.test.ts b/src/tests/sendTransactionWorker.test.ts new file mode 100644 index 000000000..5fb0a5dcb --- /dev/null +++ b/src/tests/sendTransactionWorker.test.ts @@ -0,0 +1,84 @@ +import type { Hex } from "thirdweb"; +import { describe, expect, it } from "vitest"; +import { _updateGasFees } from "../worker/tasks/sendTransactionWorker"; + +describe("_updateGasFees", () => { + const base = { + // Irrelevant values for testing. + chainId: 1, + data: "0x0" as Hex, + gas: 21000n, + to: undefined, + nonce: undefined, + accessList: undefined, + value: undefined, + }; + + it("returns the original transaction on first send (resendCount = 0)", () => { + let result = _updateGasFees({ ...base, gasPrice: 100n }, 0, undefined); + expect(result.gasPrice).toEqual(100n); + + result = _updateGasFees( + { ...base, maxFeePerGas: 100n, maxPriorityFeePerGas: 10n }, + 0, + undefined, + ); + expect(result.maxFeePerGas).toEqual(100n); + expect(result.maxPriorityFeePerGas).toEqual(10n); + }); + + it("doubles gasPrice for legacy transactions", () => { + const result = _updateGasFees({ ...base, gasPrice: 100n }, 1, {}); + expect(result.gasPrice).toBe(200n); + }); + + it("caps gasPrice multiplier at 10x", () => { + const result = _updateGasFees({ ...base, gasPrice: 100n }, 10, {}); + expect(result.gasPrice).toBe(1000n); + }); + + it("updates maxPriorityFeePerGas and maxFeePerGas for EIP-1559 transactions", () => { + const result = _updateGasFees( + { ...base, maxFeePerGas: 100n, maxPriorityFeePerGas: 10n }, + 3, + {}, + ); + expect(result.maxPriorityFeePerGas).toBe(60n); + expect(result.maxFeePerGas).toBe(260n); + }); + + it("respects overrides for maxPriorityFeePerGas", () => { + const result = _updateGasFees( + { ...base, maxFeePerGas: 100n, maxPriorityFeePerGas: 10n }, + 3, + { maxPriorityFeePerGas: 10n }, + ); + expect(result.maxPriorityFeePerGas).toBe(10n); // matches override + expect(result.maxFeePerGas).toBe(210n); + }); + + it("respects overrides for maxFeePerGas", () => { + const result = _updateGasFees( + { ...base, maxFeePerGas: 100n, maxPriorityFeePerGas: 10n }, + 3, + { maxFeePerGas: 100n }, + ); + expect(result.maxPriorityFeePerGas).toBe(60n); + expect(result.maxFeePerGas).toBe(100n); // matches override + }); + + it("returns correct values when only maxPriorityFeePerGas is set", () => { + const result = _updateGasFees( + { ...base, maxPriorityFeePerGas: 10n }, + 3, + {}, + ); + expect(result.maxPriorityFeePerGas).toBe(60n); + expect(result.maxFeePerGas).toBeUndefined(); + }); + + it("returns correct values when only maxFeePerGas is set", () => { + const result = _updateGasFees({ ...base, maxFeePerGas: 80n }, 3, {}); + expect(result.maxFeePerGas).toBe(160n); + }); +}); diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 783530ba0..c8d254581 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -422,7 +422,7 @@ const _resendTransaction = async ( // Populate the transaction with double gas. const { chainId, from, overrides, sentTransactionHashes } = sentTransaction; - const populatedTransaction = await toSerializableTransaction({ + let populatedTransaction = await toSerializableTransaction({ from: getChecksumAddress(from), transaction: { client: thirdwebClient, @@ -436,19 +436,12 @@ const _resendTransaction = async ( }, }); - // Double gas fee settings if they were not provded in `overrides`. - if (populatedTransaction.gasPrice) { - populatedTransaction.gasPrice *= 2n; - } - if (populatedTransaction.maxFeePerGas && !overrides?.maxFeePerGas) { - populatedTransaction.maxFeePerGas *= 2n; - } - if ( - populatedTransaction.maxPriorityFeePerGas && - !overrides?.maxPriorityFeePerGas - ) { - populatedTransaction.maxPriorityFeePerGas *= 2n; - } + // Increase gas fees for this resend attempt. + populatedTransaction = _updateGasFees( + populatedTransaction, + sentTransaction.resendCount + 1, + sentTransaction.overrides, + ); job.log(`Populated transaction: ${stringify(populatedTransaction)}`); @@ -559,6 +552,48 @@ const _hasExceededTimeout = ( const _minutesFromNow = (minutes: number) => new Date(Date.now() + minutes * 60_000); +/** + * Computes aggressive gas fees when resending a transaction. + * + * For legacy transactions (pre-EIP1559): + * - Gas price = (2 * attempt) * estimatedGasPrice, capped at 10x. + * + * For other transactions: + * - maxPriorityFeePerGas = (2 * attempt) * estimatedMaxPriorityFeePerGas, capped at 10x. + * - maxFeePerGas = (2 * estimatedMaxFeePerGas) + maxPriorityFeePerGas. + * + * @param populatedTransaction The transaction with estimated gas from RPC. + * @param resendCount The resend attempt #. Example: 2 = the transaction was initially sent, then resent once. This is the second resend attempt. + */ +export const _updateGasFees = ( + populatedTransaction: PopulatedTransaction, + resendCount: number, + overrides: SentTransaction["overrides"], +): PopulatedTransaction => { + if (resendCount === 0) { + return populatedTransaction; + } + + const multiplier = BigInt(Math.min(10, resendCount * 2)); + + const updated = { ...populatedTransaction }; + + // Update gas fees (unless they were explicitly overridden). + + if (updated.gasPrice && !overrides?.gasPrice) { + updated.gasPrice *= multiplier; + } + if (updated.maxPriorityFeePerGas && !overrides?.maxPriorityFeePerGas) { + updated.maxPriorityFeePerGas *= multiplier; + } + if (updated.maxFeePerGas && !overrides?.maxFeePerGas) { + updated.maxFeePerGas = + updated.maxFeePerGas * 2n + (updated.maxPriorityFeePerGas ?? 0n); + } + + return updated; +}; + // Must be explicitly called for the worker to run on this host. export const initSendTransactionWorker = () => { const _worker = new Worker(SendTransactionQueue.q.name, handler, { From 1719e0ad2013a81ebf6e68bdd6cb099918788ce3 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Sun, 8 Dec 2024 10:44:59 +0800 Subject: [PATCH 28/44] feat(experimental): configure mine worker timeout (#797) * feat(experimental): configure mine worker timeout * reduce log length --- src/utils/env.ts | 10 ++++++++++ src/worker/queues/mineTransactionQueue.ts | 6 +++++- src/worker/tasks/mineTransactionWorker.ts | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/utils/env.ts b/src/utils/env.ts index 5a8d13f00..e93a03204 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -98,6 +98,14 @@ export const env = createEnv({ QUEUE_FAIL_HISTORY_COUNT: z.coerce.number().default(10_000), // Sets the number of recent nonces to map to queue IDs. NONCE_MAP_COUNT: z.coerce.number().default(10_000), + + /** + * Experimental env vars. These may be renamed or removed in future non-major releases. + */ + // Sets how long the mine worker waits for a transaction receipt before considering the transaction dropped (default: 30 minutes). + EXPERIMENTAL__MINE_WORKER_TIMEOUT_SECONDS: z.coerce + .number() + .default(30 * 60), }, clientPrefix: "NEVER_USED", client: {}, @@ -134,6 +142,8 @@ export const env = createEnv({ QUEUE_COMPLETE_HISTORY_COUNT: process.env.QUEUE_COMPLETE_HISTORY_COUNT, QUEUE_FAIL_HISTORY_COUNT: process.env.QUEUE_FAIL_HISTORY_COUNT, NONCE_MAP_COUNT: process.env.NONCE_MAP_COUNT, + EXPERIMENTAL__MINE_WORKER_TIMEOUT_SECONDS: + process.env.EXPERIMENTAL__MINE_WORKER_TIMEOUT_SECONDS, METRICS_PORT: process.env.METRICS_PORT, METRICS_ENABLED: process.env.METRICS_ENABLED, }, diff --git a/src/worker/queues/mineTransactionQueue.ts b/src/worker/queues/mineTransactionQueue.ts index e35627272..977a727b5 100644 --- a/src/worker/queues/mineTransactionQueue.ts +++ b/src/worker/queues/mineTransactionQueue.ts @@ -1,5 +1,6 @@ import { Queue } from "bullmq"; import superjson from "superjson"; +import { env } from "../../utils/env"; import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; @@ -7,6 +8,9 @@ export type MineTransactionData = { queueId: string; }; +// Attempts are made every ~20 seconds. See backoffStrategy in initMineTransactionWorker(). +const NUM_ATTEMPTS = env.EXPERIMENTAL__MINE_WORKER_TIMEOUT_SECONDS / 20; + export class MineTransactionQueue { static q = new Queue("transactions-2-mine", { connection: redis, @@ -23,7 +27,7 @@ export class MineTransactionQueue { const jobId = this.jobId(data); await this.q.add(jobId, serialized, { jobId, - attempts: 100, // > 30 minutes with the backoffStrategy defined on the worker + attempts: NUM_ATTEMPTS, backoff: { type: "custom" }, }); }; diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index 1d3ce45f9..f054b2915 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -162,8 +162,9 @@ const _mineTransaction = async ( } // Else the transaction is not mined yet. + const ellapsedMs = Date.now() - sentTransaction.queuedAt.getTime(); job.log( - `Transaction is not mined yet. Check again later. sentTransactionHashes=${sentTransaction.sentTransactionHashes}`, + `Transaction is not mined yet. Check again later. elapsed=${ellapsedMs / 1000}s`, ); // Resend the transaction (after some initial delay). From 1505c30502b3eb97954a2bf574f4a88e467a9cba Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Sun, 8 Dec 2024 16:29:12 +0800 Subject: [PATCH 29/44] chore: Update ERC721 mint-to to v5 (#798) * chore: Update erc721 mintTo to thirdweb v5 sdk * fix metadata * fit type * comment --- .../extensions/erc721/write/mintTo.ts | 75 ++++++++++++++----- 1 file changed, 55 insertions(+), 20 deletions(-) diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mintTo.ts index 8099991eb..22e6345ca 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintTo.ts @@ -1,8 +1,12 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { Type, type Static } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "thirdweb"; +import { mintTo } from "thirdweb/extensions/erc721"; +import type { NFTInput } from "thirdweb/utils"; +import { getChain } from "../../../../../../utils/chain"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { @@ -12,7 +16,11 @@ import { transactionWritesResponseSchema, } from "../../../../../schemas/sharedApiSchemas"; import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; -import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; +import { + maybeAddress, + requiredAddress, + walletWithAAHeaderSchema, +} from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUTS @@ -61,31 +69,58 @@ export async function erc721mintTo(fastify: FastifyInstance) { }, }, handler: async (request, reply) => { - const { chain, contractAddress } = request.params; + const { chain: _chain, contractAddress } = request.params; const { simulateTx } = request.query; const { receiver, metadata, txOverrides } = request.body; const { - "x-backend-wallet-address": walletAddress, + "x-backend-wallet-address": fromAddress, "x-account-address": accountAddress, "x-idempotency-key": idempotencyKey, + "x-account-factory-address": accountFactoryAddress, + "x-account-salt": accountSalt, } = request.headers as Static; - const chainId = await getChainIdFromChain(chain); - const contract = await getContract({ - chainId, - contractAddress, - walletAddress, - accountAddress, + const chainId = await getChainIdFromChain(_chain); + const chain = await getChain(chainId); + + const contract = getContract({ + chain, + client: thirdwebClient, + address: contractAddress, }); - const tx = await contract.erc721.mintTo.prepare(receiver, metadata); - const queueId = await queueTx({ - tx, - chainId, - simulateTx, - extension: "erc721", - idempotencyKey, + // Backward compatibility: Transform the request body's v4 shape to v5. + const nft: NFTInput | string = + typeof metadata === "string" + ? metadata + : { + name: metadata.name?.toString() ?? undefined, + description: metadata.description ?? undefined, + image: metadata.image ?? undefined, + animation_url: metadata.animation_url ?? undefined, + external_url: metadata.external_url ?? undefined, + background_color: metadata.background_color ?? undefined, + properties: metadata.properties, + }; + const transaction = mintTo({ + contract, + to: receiver, + nft, + }); + + const queueId = await queueTransaction({ + transaction, + fromAddress: requiredAddress(fromAddress, "x-backend-wallet-address"), + toAddress: maybeAddress(contractAddress, "to"), + accountAddress: maybeAddress(accountAddress, "x-account-address"), + accountFactoryAddress: maybeAddress( + accountFactoryAddress, + "x-account-factory-address", + ), + accountSalt, txOverrides, + idempotencyKey, + shouldSimulate: simulateTx, }); reply.status(StatusCodes.OK).send({ From c7f12371af43c93d7100c0089948b34220dcd31f Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Sun, 8 Dec 2024 17:50:48 +0800 Subject: [PATCH 30/44] chore: Update ERC20 and ERC1155 mintTo to thirdweb v5 (#799) --- .../extensions/erc1155/write/mintTo.ts | 79 +++++++++++++------ .../contract/extensions/erc20/write/mintTo.ts | 58 +++++++++----- .../extensions/erc721/write/mintTo.ts | 2 + 3 files changed, 99 insertions(+), 40 deletions(-) diff --git a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts index 0f72457f8..4fe92d9be 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts @@ -1,8 +1,12 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "thirdweb"; +import { mintTo } from "thirdweb/extensions/erc1155"; +import type { NFTInput } from "thirdweb/utils"; +import { getChain } from "../../../../../../utils/chain"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { @@ -12,10 +16,13 @@ import { transactionWritesResponseSchema, } from "../../../../../schemas/sharedApiSchemas"; import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; -import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; +import { + maybeAddress, + requiredAddress, + walletWithAAHeaderSchema, +} from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; -// INPUTS const requestSchema = erc1155ContractParamSchema; const requestBodySchema = Type.Object({ receiver: { @@ -66,34 +73,62 @@ export async function erc1155mintTo(fastify: FastifyInstance) { }, }, handler: async (request, reply) => { - const { chain, contractAddress } = request.params; + const { chain: _chain, contractAddress } = request.params; const { simulateTx } = request.query; const { receiver, metadataWithSupply, txOverrides } = request.body; const { - "x-backend-wallet-address": walletAddress, + "x-backend-wallet-address": fromAddress, "x-account-address": accountAddress, "x-idempotency-key": idempotencyKey, + "x-account-factory-address": accountFactoryAddress, + "x-account-salt": accountSalt, } = request.headers as Static; - const chainId = await getChainIdFromChain(chain); - const contract = await getContract({ - chainId, - contractAddress, - walletAddress, - accountAddress, + const chainId = await getChainIdFromChain(_chain); + const chain = await getChain(chainId); + + const contract = getContract({ + chain, + client: thirdwebClient, + address: contractAddress, }); - const tx = await contract.erc1155.mintTo.prepare( - receiver, - metadataWithSupply, - ); - const queueId = await queueTx({ - tx, - chainId, - simulateTx, - extension: "erc1155", - idempotencyKey, + // Backward compatibility: Transform the request body's v4 shape to v5. + const { metadata, supply } = metadataWithSupply; + const nft: NFTInput | string = + typeof metadata === "string" + ? metadata + : { + name: metadata.name?.toString() ?? undefined, + description: metadata.description ?? undefined, + image: metadata.image ?? undefined, + animation_url: metadata.animation_url ?? undefined, + external_url: metadata.external_url ?? undefined, + background_color: metadata.background_color ?? undefined, + properties: metadata.properties, + }; + const transaction = mintTo({ + contract, + to: receiver, + nft, + supply: BigInt(supply), + }); + + const queueId = await queueTransaction({ + transaction, + fromAddress: requiredAddress(fromAddress, "x-backend-wallet-address"), + toAddress: maybeAddress(contractAddress, "to"), + accountAddress: maybeAddress(accountAddress, "x-account-address"), + accountFactoryAddress: maybeAddress( + accountFactoryAddress, + "x-account-factory-address", + ), + accountSalt, txOverrides, + idempotencyKey, + extension: "erc1155", + functionName: "mintTo", + shouldSimulate: simulateTx, }); reply.status(StatusCodes.OK).send({ diff --git a/src/server/routes/contract/extensions/erc20/write/mintTo.ts b/src/server/routes/contract/extensions/erc20/write/mintTo.ts index db3a9968e..32d54e502 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintTo.ts @@ -1,8 +1,11 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "thirdweb"; +import { mintTo } from "thirdweb/extensions/erc20"; +import { getChain } from "../../../../../../utils/chain"; +import { thirdwebClient } from "../../../../../../utils/sdk"; +import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, @@ -11,7 +14,11 @@ import { transactionWritesResponseSchema, } from "../../../../../schemas/sharedApiSchemas"; import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; -import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; +import { + maybeAddress, + requiredAddress, + walletWithAAHeaderSchema, +} from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUTS @@ -59,31 +66,46 @@ export async function erc20mintTo(fastify: FastifyInstance) { }, }, handler: async (request, reply) => { - const { chain, contractAddress } = request.params; + const { chain: _chain, contractAddress } = request.params; const { simulateTx } = request.query; const { toAddress, amount, txOverrides } = request.body; const { - "x-backend-wallet-address": walletAddress, + "x-backend-wallet-address": fromAddress, "x-account-address": accountAddress, "x-idempotency-key": idempotencyKey, + "x-account-factory-address": accountFactoryAddress, + "x-account-salt": accountSalt, } = request.headers as Static; - const chainId = await getChainIdFromChain(chain); - const contract = await getContract({ - chainId, - contractAddress, - walletAddress, - accountAddress, + const chainId = await getChainIdFromChain(_chain); + const chain = await getChain(chainId); + + const contract = getContract({ + chain, + client: thirdwebClient, + address: contractAddress, + }); + const transaction = mintTo({ + contract, + to: toAddress, + amount, }); - const tx = await contract.erc20.mintTo.prepare(toAddress, amount); - const queueId = await queueTx({ - tx, - chainId, - simulateTx, - extension: "erc20", - idempotencyKey, + const queueId = await queueTransaction({ + transaction, + fromAddress: requiredAddress(fromAddress, "x-backend-wallet-address"), + toAddress: maybeAddress(contractAddress, "to"), + accountAddress: maybeAddress(accountAddress, "x-account-address"), + accountFactoryAddress: maybeAddress( + accountFactoryAddress, + "x-account-factory-address", + ), + accountSalt, txOverrides, + idempotencyKey, + extension: "erc20", + functionName: "mintTo", + shouldSimulate: simulateTx, }); reply.status(StatusCodes.OK).send({ diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mintTo.ts index 22e6345ca..0a8f108da 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintTo.ts @@ -120,6 +120,8 @@ export async function erc721mintTo(fastify: FastifyInstance) { accountSalt, txOverrides, idempotencyKey, + extension: "erc721", + functionName: "mintTo", shouldSimulate: simulateTx, }); From 85b2aff740f24b2f73895717dfa2486301f8dba4 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Mon, 9 Dec 2024 22:01:40 +0800 Subject: [PATCH 31/44] feat(experimental): Add an env var to limit the max gas price for resends (#800) * set max gas price per wei * bigMath * add unit tests * rename --- src/tests/math.test.ts | 80 ++++++++++++++++++++++- src/utils/env.ts | 6 +- src/utils/math.ts | 5 ++ src/worker/tasks/sendTransactionWorker.ts | 18 +++-- 4 files changed, 100 insertions(+), 9 deletions(-) diff --git a/src/tests/math.test.ts b/src/tests/math.test.ts index 6303d6bed..7fe88c307 100644 --- a/src/tests/math.test.ts +++ b/src/tests/math.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { getPercentile } from "../utils/math"; +import { bigMath, getPercentile } from "../utils/math"; describe("getPercentile", () => { it("should correctly calculate the p50 (median) of a sorted array", () => { @@ -27,3 +27,81 @@ describe("getPercentile", () => { expect(getPercentile(numbers, 50)).toBe(0); }); }); + +describe("bigMath", () => { + describe("min", () => { + it("should return the smaller of two positive numbers", () => { + const a = 5n; + const b = 10n; + expect(bigMath.min(a, b)).toBe(5n); + }); + + it("should return the smaller of two negative numbers", () => { + const a = -10n; + const b = -5n; + expect(bigMath.min(a, b)).toBe(-10n); + }); + + it("should handle equal numbers", () => { + const a = 5n; + const b = 5n; + expect(bigMath.min(a, b)).toBe(5n); + }); + + it("should handle zero and positive number", () => { + const a = 0n; + const b = 5n; + expect(bigMath.min(a, b)).toBe(0n); + }); + + it("should handle zero and negative number", () => { + const a = 0n; + const b = -5n; + expect(bigMath.min(a, b)).toBe(-5n); + }); + + it("should handle very large numbers", () => { + const a = BigInt(Number.MAX_SAFE_INTEGER) * 2n; + const b = BigInt(Number.MAX_SAFE_INTEGER); + expect(bigMath.min(a, b)).toBe(b); + }); + }); + + describe("max", () => { + it("should return the larger of two positive numbers", () => { + const a = 5n; + const b = 10n; + expect(bigMath.max(a, b)).toBe(10n); + }); + + it("should return the larger of two negative numbers", () => { + const a = -10n; + const b = -5n; + expect(bigMath.max(a, b)).toBe(-5n); + }); + + it("should handle equal numbers", () => { + const a = 5n; + const b = 5n; + expect(bigMath.max(a, b)).toBe(5n); + }); + + it("should handle zero and positive number", () => { + const a = 0n; + const b = 5n; + expect(bigMath.max(a, b)).toBe(5n); + }); + + it("should handle zero and negative number", () => { + const a = 0n; + const b = -5n; + expect(bigMath.max(a, b)).toBe(0n); + }); + + it("should handle very large numbers", () => { + const a = BigInt(Number.MAX_SAFE_INTEGER) * 2n; + const b = BigInt(Number.MAX_SAFE_INTEGER); + expect(bigMath.max(a, b)).toBe(a); + }); + }); +}); diff --git a/src/utils/env.ts b/src/utils/env.ts index e93a03204..3fa84dcc2 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -102,10 +102,12 @@ export const env = createEnv({ /** * Experimental env vars. These may be renamed or removed in future non-major releases. */ - // Sets how long the mine worker waits for a transaction receipt before considering the transaction dropped (default: 30 minutes). + // Sets how long the mine worker waits for a transaction receipt before considering the transaction dropped. Default: 30 minutes EXPERIMENTAL__MINE_WORKER_TIMEOUT_SECONDS: z.coerce .number() .default(30 * 60), + // Sets the max gas price for a transaction attempt. Most RPCs reject transactions above a certain gas price. Default: 10^18 wei. + EXPERIMENTAL__MAX_GAS_PRICE_WEI: z.coerce.number().default(10 ** 18), }, clientPrefix: "NEVER_USED", client: {}, @@ -144,6 +146,8 @@ export const env = createEnv({ NONCE_MAP_COUNT: process.env.NONCE_MAP_COUNT, EXPERIMENTAL__MINE_WORKER_TIMEOUT_SECONDS: process.env.EXPERIMENTAL__MINE_WORKER_TIMEOUT_SECONDS, + EXPERIMENTAL__MAX_GAS_PRICE_WEI: + process.env.EXPERIMENTAL__MAX_GAS_PRICE_WEI, METRICS_PORT: process.env.METRICS_PORT, METRICS_ENABLED: process.env.METRICS_ENABLED, }, diff --git a/src/utils/math.ts b/src/utils/math.ts index 2f693d661..5ec56723a 100644 --- a/src/utils/math.ts +++ b/src/utils/math.ts @@ -7,3 +7,8 @@ export const getPercentile = (arr: number[], percentile: number): number => { const index = Math.floor((percentile / 100) * (arr.length - 1)); return arr[index]; }; + +export const BigIntMath = { + min: (a: bigint, b: bigint) => (a < b ? a : b), + max: (a: bigint, b: bigint) => (a > b ? a : b), +}; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index c8d254581..9dff3c4b4 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -39,6 +39,7 @@ import { isReplacementGasFeeTooLow, wrapError, } from "../../utils/error"; +import { BigIntMath } from "../../utils/math"; import { getChecksumAddress } from "../../utils/primitiveTypes"; import { recordMetrics } from "../../utils/prometheus"; import { redis } from "../../utils/redis/redis"; @@ -565,34 +566,37 @@ const _minutesFromNow = (minutes: number) => * @param populatedTransaction The transaction with estimated gas from RPC. * @param resendCount The resend attempt #. Example: 2 = the transaction was initially sent, then resent once. This is the second resend attempt. */ -export const _updateGasFees = ( +export function _updateGasFees( populatedTransaction: PopulatedTransaction, resendCount: number, overrides: SentTransaction["overrides"], -): PopulatedTransaction => { +): PopulatedTransaction { if (resendCount === 0) { return populatedTransaction; } - const multiplier = BigInt(Math.min(10, resendCount * 2)); - + const multiplier = BigIntMath.min(10n, BigInt(resendCount) * 2n); const updated = { ...populatedTransaction }; // Update gas fees (unless they were explicitly overridden). + // Do not exceed MAX_GAS_PRICE_WEI. + const MAX_GAS_PRICE_WEI = BigInt(env.EXPERIMENTAL__MAX_GAS_PRICE_WEI); if (updated.gasPrice && !overrides?.gasPrice) { - updated.gasPrice *= multiplier; + const newGasPrice = updated.gasPrice * multiplier; + updated.gasPrice = BigIntMath.min(newGasPrice, MAX_GAS_PRICE_WEI); } if (updated.maxPriorityFeePerGas && !overrides?.maxPriorityFeePerGas) { updated.maxPriorityFeePerGas *= multiplier; } if (updated.maxFeePerGas && !overrides?.maxFeePerGas) { - updated.maxFeePerGas = + const newMaxFeePerGas = updated.maxFeePerGas * 2n + (updated.maxPriorityFeePerGas ?? 0n); + updated.maxFeePerGas = BigIntMath.min(newMaxFeePerGas, MAX_GAS_PRICE_WEI); } return updated; -}; +} // Must be explicitly called for the worker to run on this host. export const initSendTransactionWorker = () => { From d3d9a2ac927c3fd0d213a410d7781213556d9844 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 11:42:55 +0800 Subject: [PATCH 32/44] chore(cleanup): remove v1 migration worker (#801) * remove migrate postgres worker * undo sdk * lint * lint --- src/index.ts | 2 - src/server/middleware/adminRoutes.ts | 2 - src/worker/index.ts | 3 - .../migratePostgresTransactionsQueue.ts | 17 -- .../migratePostgresTransactionsWorker.ts | 227 ------------------ 5 files changed, 251 deletions(-) delete mode 100644 src/worker/queues/migratePostgresTransactionsQueue.ts delete mode 100644 src/worker/tasks/migratePostgresTransactionsWorker.ts diff --git a/src/index.ts b/src/index.ts index 764540ee4..f2f48a96e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,6 @@ import { logger } from "./utils/logger"; import "./utils/tracer"; import { initWorker } from "./worker"; import { CancelRecycledNoncesQueue } from "./worker/queues/cancelRecycledNoncesQueue"; -import { MigratePostgresTransactionsQueue } from "./worker/queues/migratePostgresTransactionsQueue"; import { MineTransactionQueue } from "./worker/queues/mineTransactionQueue"; import { NonceResyncQueue } from "./worker/queues/nonceResyncQueue"; import { ProcessEventsLogQueue } from "./worker/queues/processEventLogsQueue"; @@ -69,7 +68,6 @@ const gracefulShutdown = async (signal: NodeJS.Signals) => { await MineTransactionQueue.q.close(); await CancelRecycledNoncesQueue.q.close(); await PruneTransactionsQueue.q.close(); - await MigratePostgresTransactionsQueue.q.close(); await NonceResyncQueue.q.close(); process.exit(0); diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/adminRoutes.ts index 1dac982df..13b01630a 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/adminRoutes.ts @@ -7,7 +7,6 @@ import { StatusCodes } from "http-status-codes"; import { timingSafeEqual } from "node:crypto"; import { env } from "../../utils/env"; import { CancelRecycledNoncesQueue } from "../../worker/queues/cancelRecycledNoncesQueue"; -import { MigratePostgresTransactionsQueue } from "../../worker/queues/migratePostgresTransactionsQueue"; import { MineTransactionQueue } from "../../worker/queues/mineTransactionQueue"; import { NonceHealthCheckQueue } from "../../worker/queues/nonceHealthCheckQueue"; import { NonceResyncQueue } from "../../worker/queues/nonceResyncQueue"; @@ -30,7 +29,6 @@ const QUEUES: Queue[] = [ MineTransactionQueue.q, CancelRecycledNoncesQueue.q, PruneTransactionsQueue.q, - MigratePostgresTransactionsQueue.q, NonceResyncQueue.q, NonceHealthCheckQueue.q, ]; diff --git a/src/worker/index.ts b/src/worker/index.ts index 638e0fc15..cd9867a25 100644 --- a/src/worker/index.ts +++ b/src/worker/index.ts @@ -8,7 +8,6 @@ import { updatedWebhooksListener, } from "./listeners/webhookListener"; import { initCancelRecycledNoncesWorker } from "./tasks/cancelRecycledNoncesWorker"; -import { initMigratePostgresTransactionsWorker } from "./tasks/migratePostgresTransactionsWorker"; import { initMineTransactionWorker } from "./tasks/mineTransactionWorker"; import { initNonceHealthCheckWorker } from "./tasks/nonceHealthCheckWorker"; import { initNonceResyncWorker } from "./tasks/nonceResyncWorker"; @@ -29,8 +28,6 @@ export const initWorker = async () => { initNonceHealthCheckWorker(); - await initMigratePostgresTransactionsWorker(); - await initNonceResyncWorker(); // Listen for new & updated configuration data. diff --git a/src/worker/queues/migratePostgresTransactionsQueue.ts b/src/worker/queues/migratePostgresTransactionsQueue.ts deleted file mode 100644 index 5e3100080..000000000 --- a/src/worker/queues/migratePostgresTransactionsQueue.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; -import { defaultJobOptions } from "./queues"; - -export class MigratePostgresTransactionsQueue { - static q = new Queue("migrate-postgres-transactions", { - connection: redis, - defaultJobOptions, - }); - - constructor() { - MigratePostgresTransactionsQueue.q.setGlobalConcurrency(1); - - // The cron job is defined in `initMigratePostgresTransactionsWorker` - // because it requires an async call to query configuration. - } -} diff --git a/src/worker/tasks/migratePostgresTransactionsWorker.ts b/src/worker/tasks/migratePostgresTransactionsWorker.ts deleted file mode 100644 index 7547d9b75..000000000 --- a/src/worker/tasks/migratePostgresTransactionsWorker.ts +++ /dev/null @@ -1,227 +0,0 @@ -import type { Transactions } from "@prisma/client"; -import { Worker, type Job, type Processor } from "bullmq"; -import assert from "node:assert"; -import type { Hex } from "thirdweb"; -import { getPrismaWithPostgresTx, prisma } from "../../db/client"; -import { TransactionDB } from "../../db/transactions/db"; -import type { PrismaTransaction } from "../../schema/prisma"; -import { getConfig } from "../../utils/cache/getConfig"; -import { logger } from "../../utils/logger"; -import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; -import { redis } from "../../utils/redis/redis"; -import type { - QueuedTransaction, - SentTransaction, -} from "../../utils/transaction/types"; -import { MigratePostgresTransactionsQueue } from "../queues/migratePostgresTransactionsQueue"; -import { MineTransactionQueue } from "../queues/mineTransactionQueue"; -import { logWorkerExceptions } from "../queues/queues"; -import { SendTransactionQueue } from "../queues/sendTransactionQueue"; - -// Must be explicitly called for the worker to run on this host. -export const initMigratePostgresTransactionsWorker = async () => { - const config = await getConfig(); - if (config.minedTxListenerCronSchedule) { - MigratePostgresTransactionsQueue.q.add("cron", "", { - repeat: { pattern: config.minedTxListenerCronSchedule }, - jobId: "migrate-postgres-transactions-cron", - }); - } - - const _worker = new Worker(MigratePostgresTransactionsQueue.q.name, handler, { - connection: redis, - concurrency: 1, - }); - logWorkerExceptions(_worker); -}; - -const handler: Processor = async (job: Job) => { - // Migrate sent transactions from PostgresDB -> Redis queue. - await prisma.$transaction(async (pgtx) => { - const sentTransactionRows = await getSentPostgresTransactions(pgtx); - const toCancel: string[] = []; - - for (const row of sentTransactionRows) { - // Update DB, enqueue a "MineTransaction" job, and cancel the transaction in DB. - try { - const sentTransaction = toSentTransaction(row); - await TransactionDB.set(sentTransaction); - await MineTransactionQueue.add({ queueId: sentTransaction.queueId }); - toCancel.push(row.id); - job.log(`Migrated sent transaction ${row.id}.`); - } catch (e) { - const errorMessage = `Error migrating sent transaction: ${e}`; - job.log(errorMessage); - logger({ - service: "worker", - level: "error", - queueId: row.id, - message: errorMessage, - }); - } - } - - await cancelPostgresTransactions({ pgtx, queueIds: toCancel }); - job.log(`Done migrating ${toCancel.length} sent transactions.`); - }); - - // Migrate queued transactions from PostgresDB -> Redis queue. - await prisma.$transaction(async (pgtx) => { - const queuedTransactionRows = await getQueuedPostgresTransactions(pgtx); - const toCancel: string[] = []; - - for (const row of queuedTransactionRows) { - // Update DB, enqueue a "MineTransaction" job, and cancel the transaction in DB. - try { - const queuedTransaction = toQueuedTransaction(row); - await TransactionDB.set(queuedTransaction); - await SendTransactionQueue.add({ - queueId: queuedTransaction.queueId, - resendCount: 0, - }); - toCancel.push(row.id); - job.log(`Migrated queued transaction ${row.id}.`); - } catch (e) { - const errorMessage = `Error migrating sent transaction: ${e}`; - job.log(errorMessage); - logger({ - service: "worker", - level: "error", - queueId: row.id, - message: errorMessage, - }); - } - } - - await cancelPostgresTransactions({ pgtx, queueIds: toCancel }); - job.log(`Done migrating ${toCancel.length} queued transactions.`); - }); -}; - -const cancelPostgresTransactions = async ({ - pgtx, - queueIds, -}: { - pgtx: PrismaTransaction; - queueIds: string[]; -}) => { - if (queueIds.length === 0) { - return; - } - - const cancelledAt = new Date(); - const prisma = getPrismaWithPostgresTx(pgtx); - await prisma.transactions.updateMany({ - where: { id: { in: queueIds } }, - data: { cancelledAt }, - }); -}; - -const getSentPostgresTransactions = async ( - pgtx: PrismaTransaction, -): Promise => { - const config = await getConfig(); - const prisma = getPrismaWithPostgresTx(pgtx); - - return await prisma.$queryRaw` - SELECT * FROM "transactions" - WHERE - "sentAt" IS NOT NULL - AND "minedAt" IS NULL - AND "cancelledAt" IS NULL - AND "errorMessage" IS NULL - ORDER BY "nonce" ASC - LIMIT ${config.maxTxsToUpdate} - FOR UPDATE SKIP LOCKED`; -}; - -const getQueuedPostgresTransactions = async ( - pgtx: PrismaTransaction, -): Promise => { - const config = await getConfig(); - const prisma = getPrismaWithPostgresTx(pgtx); - - return await prisma.$queryRaw` - SELECT * FROM "transactions" - WHERE - "sentAt" IS NULL - AND "minedAt" IS NULL - AND "cancelledAt" IS NULL - AND "errorMessage" IS NULL - ORDER BY "queuedAt" ASC - LIMIT ${config.maxTxsToProcess} - FOR UPDATE SKIP LOCKED`; -}; - -const toSentTransaction = (row: Transactions): SentTransaction => { - assert(row.sentAt); - assert(row.sentAtBlockNumber); - const queuedTransaction = toQueuedTransaction(row); - - if (queuedTransaction.isUserOp) { - assert(row.userOpHash); - return { - ...queuedTransaction, - status: "sent", - isUserOp: true, - sentAt: row.sentAt, - sentAtBlock: BigInt(row.sentAtBlockNumber), - nonce: "", // unused - userOpHash: row.userOpHash as Hex, - gas: maybeBigInt(row.gasLimit ?? undefined) ?? 0n, - }; - } - - assert(row.transactionHash); - assert(row.nonce); - return { - ...queuedTransaction, - ...queuedTransaction.overrides, - status: "sent", - isUserOp: false, - sentAt: row.sentAt, - sentAtBlock: BigInt(row.sentAtBlockNumber), - nonce: row.nonce, - sentTransactionHashes: [row.transactionHash as Hex], - gas: maybeBigInt(row.gasLimit ?? undefined) ?? 0n, - }; -}; - -const toQueuedTransaction = (row: Transactions): QueuedTransaction => { - assert(row.fromAddress); - assert(row.data); - - return { - status: "queued", - queueId: row.idempotencyKey, - queuedAt: row.queuedAt, - resendCount: 0, - - isUserOp: !!row.accountAddress, - chainId: parseInt(row.chainId), - from: normalizeAddress(row.fromAddress), - to: normalizeAddress(row.toAddress), - value: row.value ? BigInt(row.value) : 0n, - - data: row.data as Hex, - functionName: row.functionName ?? undefined, - functionArgs: row.functionArgs?.split(","), - - overrides: { - gas: maybeBigInt(row.gasLimit ?? undefined), - maxFeePerGas: maybeBigInt(row.maxFeePerGas ?? undefined), - maxPriorityFeePerGas: maybeBigInt(row.maxPriorityFeePerGas ?? undefined), - }, - - // Offchain metadata - deployedContractAddress: normalizeAddress(row.deployedContractAddress), - deployedContractType: row.deployedContractType ?? undefined, - extension: row.extension ?? undefined, - - // User Operation - signerAddress: normalizeAddress(row.signerAddress), - accountAddress: normalizeAddress(row.accountAddress), - target: normalizeAddress(row.target), - sender: normalizeAddress(row.sender), - }; -}; From 88b988c0a96c54202611c0b0c27e38500e29b9ba Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 13:27:25 +0800 Subject: [PATCH 33/44] refactor: Simplify folder organization in the repo (#796) * Revert "Revert "refactor: clearer folder organization (#792)" (#795)" This reverts commit 8f668fe5eadc41cd68c77dc9ce94144b88fd3aa1. * copy scripts folder * move scripts back * fix import --- .vscode/settings.json | 17 -------- src/index.ts | 7 ++-- src/polyfill.ts | 2 +- src/scripts/apply-migrations.ts | 10 +++-- src/scripts/setup-db.ts | 8 ++-- src/server/index.ts | 10 ++--- src/server/listeners/updateTxListener.ts | 6 +-- src/server/middleware/adminRoutes.ts | 2 +- src/server/middleware/auth.ts | 30 +++++++------- src/server/middleware/cors.ts | 2 +- src/server/middleware/engineMode.ts | 2 +- src/server/middleware/error.ts | 4 +- src/server/middleware/logs.ts | 2 +- src/server/middleware/prometheus.ts | 4 +- src/server/middleware/rateLimit.ts | 4 +- src/server/middleware/websocket.ts | 2 +- src/server/routes/admin/nonces.ts | 14 +++---- src/server/routes/admin/transaction.ts | 14 +++---- .../routes/auth/access-tokens/create.ts | 10 ++--- .../routes/auth/access-tokens/getAll.ts | 2 +- .../routes/auth/access-tokens/revoke.ts | 4 +- .../routes/auth/access-tokens/update.ts | 4 +- src/server/routes/auth/keypair/add.ts | 12 +++--- src/server/routes/auth/keypair/list.ts | 11 +++-- src/server/routes/auth/keypair/remove.ts | 8 ++-- src/server/routes/auth/permissions/getAll.ts | 2 +- src/server/routes/auth/permissions/grant.ts | 4 +- src/server/routes/auth/permissions/revoke.ts | 2 +- .../routes/backend-wallet/cancel-nonces.ts | 6 +-- src/server/routes/backend-wallet/create.ts | 4 +- src/server/routes/backend-wallet/getAll.ts | 2 +- .../routes/backend-wallet/getBalance.ts | 6 +-- src/server/routes/backend-wallet/getNonce.ts | 2 +- .../routes/backend-wallet/getTransactions.ts | 6 +-- .../backend-wallet/getTransactionsByNonce.ts | 8 ++-- src/server/routes/backend-wallet/import.ts | 2 +- src/server/routes/backend-wallet/remove.ts | 8 ++-- .../routes/backend-wallet/reset-nonces.ts | 2 +- .../routes/backend-wallet/sendTransaction.ts | 2 +- .../backend-wallet/sendTransactionBatch.ts | 2 +- .../routes/backend-wallet/signMessage.ts | 6 +-- .../routes/backend-wallet/signTransaction.ts | 6 +-- .../routes/backend-wallet/signTypedData.ts | 6 +-- .../backend-wallet/simulateTransaction.ts | 4 +- src/server/routes/backend-wallet/transfer.ts | 10 ++--- src/server/routes/backend-wallet/update.ts | 6 +-- src/server/routes/backend-wallet/withdraw.ts | 12 +++--- src/server/routes/chain/get.ts | 2 +- src/server/routes/chain/getAll.ts | 2 +- src/server/routes/configuration/auth/get.ts | 6 +-- .../routes/configuration/auth/update.ts | 8 ++-- .../backend-wallet-balance/get.ts | 6 +-- .../backend-wallet-balance/update.ts | 4 +- src/server/routes/configuration/cache/get.ts | 6 +-- .../routes/configuration/cache/update.ts | 12 +++--- src/server/routes/configuration/chains/get.ts | 2 +- .../routes/configuration/chains/update.ts | 6 +-- .../contract-subscriptions/get.ts | 6 +-- .../contract-subscriptions/update.ts | 4 +- src/server/routes/configuration/cors/add.ts | 8 ++-- src/server/routes/configuration/cors/get.ts | 6 +-- .../routes/configuration/cors/remove.ts | 8 ++-- src/server/routes/configuration/cors/set.ts | 4 +- src/server/routes/configuration/ip/get.ts | 6 +-- src/server/routes/configuration/ip/set.ts | 8 ++-- .../routes/configuration/transactions/get.ts | 2 +- .../configuration/transactions/update.ts | 4 +- .../routes/configuration/wallets/get.ts | 4 +- .../routes/configuration/wallets/update.ts | 6 +-- .../routes/contract/events/getAllEvents.ts | 6 +-- .../contract/events/getContractEventLogs.ts | 4 +- .../events/getEventLogsByTimestamp.ts | 2 +- .../routes/contract/events/getEvents.ts | 6 +-- .../contract/events/paginateEventLogs.ts | 4 +- .../extensions/account/read/getAllAdmins.ts | 6 +-- .../extensions/account/read/getAllSessions.ts | 6 +-- .../extensions/account/write/grantAdmin.ts | 4 +- .../extensions/account/write/grantSession.ts | 4 +- .../extensions/account/write/revokeAdmin.ts | 4 +- .../extensions/account/write/revokeSession.ts | 4 +- .../extensions/account/write/updateSession.ts | 4 +- .../accountFactory/read/getAllAccounts.ts | 6 +-- .../read/getAssociatedAccounts.ts | 6 +-- .../accountFactory/read/isAccountDeployed.ts | 6 +-- .../read/predictAccountAddress.ts | 2 +- .../accountFactory/write/createAccount.ts | 6 +-- .../extensions/erc1155/read/balanceOf.ts | 2 +- .../extensions/erc1155/read/canClaim.ts | 2 +- .../contract/extensions/erc1155/read/get.ts | 2 +- .../erc1155/read/getActiveClaimConditions.ts | 2 +- .../extensions/erc1155/read/getAll.ts | 2 +- .../erc1155/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc1155/read/getClaimerProofs.ts | 2 +- .../extensions/erc1155/read/getOwned.ts | 2 +- .../extensions/erc1155/read/isApproved.ts | 2 +- .../erc1155/read/signatureGenerate.ts | 10 ++--- .../extensions/erc1155/read/totalCount.ts | 2 +- .../extensions/erc1155/read/totalSupply.ts | 2 +- .../extensions/erc1155/write/airdrop.ts | 4 +- .../contract/extensions/erc1155/write/burn.ts | 4 +- .../extensions/erc1155/write/burnBatch.ts | 4 +- .../extensions/erc1155/write/claimTo.ts | 6 +-- .../extensions/erc1155/write/lazyMint.ts | 4 +- .../erc1155/write/mintAdditionalSupplyTo.ts | 4 +- .../extensions/erc1155/write/mintBatchTo.ts | 4 +- .../extensions/erc1155/write/mintTo.ts | 6 +-- .../erc1155/write/setApprovalForAll.ts | 4 +- .../erc1155/write/setBatchClaimConditions.ts | 4 +- .../erc1155/write/setClaimConditions.ts | 4 +- .../extensions/erc1155/write/signatureMint.ts | 4 +- .../extensions/erc1155/write/transfer.ts | 8 ++-- .../extensions/erc1155/write/transferFrom.ts | 8 ++-- .../erc1155/write/updateClaimConditions.ts | 4 +- .../erc1155/write/updateTokenMetadata.ts | 4 +- .../extensions/erc20/read/allowanceOf.ts | 2 +- .../extensions/erc20/read/balanceOf.ts | 2 +- .../extensions/erc20/read/canClaim.ts | 6 +-- .../contract/extensions/erc20/read/get.ts | 2 +- .../erc20/read/getActiveClaimConditions.ts | 2 +- .../erc20/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../extensions/erc20/read/getClaimerProofs.ts | 2 +- .../erc20/read/signatureGenerate.ts | 10 ++--- .../extensions/erc20/read/totalSupply.ts | 2 +- .../contract/extensions/erc20/write/burn.ts | 4 +- .../extensions/erc20/write/burnFrom.ts | 4 +- .../extensions/erc20/write/claimTo.ts | 6 +-- .../extensions/erc20/write/mintBatchTo.ts | 4 +- .../contract/extensions/erc20/write/mintTo.ts | 6 +-- .../extensions/erc20/write/setAllowance.ts | 4 +- .../erc20/write/setClaimConditions.ts | 4 +- .../extensions/erc20/write/signatureMint.ts | 4 +- .../extensions/erc20/write/transfer.ts | 8 ++-- .../extensions/erc20/write/transferFrom.ts | 8 ++-- .../erc20/write/updateClaimConditions.ts | 4 +- .../extensions/erc721/read/balanceOf.ts | 2 +- .../extensions/erc721/read/canClaim.ts | 2 +- .../contract/extensions/erc721/read/get.ts | 2 +- .../erc721/read/getActiveClaimConditions.ts | 2 +- .../contract/extensions/erc721/read/getAll.ts | 2 +- .../erc721/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc721/read/getClaimerProofs.ts | 2 +- .../extensions/erc721/read/getOwned.ts | 2 +- .../extensions/erc721/read/isApproved.ts | 2 +- .../erc721/read/signatureGenerate.ts | 10 ++--- .../erc721/read/signaturePrepare.ts | 6 +-- .../erc721/read/totalClaimedSupply.ts | 2 +- .../extensions/erc721/read/totalCount.ts | 2 +- .../erc721/read/totalUnclaimedSupply.ts | 2 +- .../contract/extensions/erc721/write/burn.ts | 4 +- .../extensions/erc721/write/claimTo.ts | 6 +-- .../extensions/erc721/write/lazyMint.ts | 8 ++-- .../extensions/erc721/write/mintBatchTo.ts | 8 ++-- .../extensions/erc721/write/mintTo.ts | 6 +-- .../erc721/write/setApprovalForAll.ts | 8 ++-- .../erc721/write/setApprovalForToken.ts | 8 ++-- .../erc721/write/setClaimConditions.ts | 10 ++--- .../extensions/erc721/write/signatureMint.ts | 18 ++++---- .../extensions/erc721/write/transfer.ts | 8 ++-- .../extensions/erc721/write/transferFrom.ts | 8 ++-- .../erc721/write/updateClaimConditions.ts | 10 ++--- .../erc721/write/updateTokenMetadata.ts | 8 ++-- .../directListings/read/getAll.ts | 2 +- .../directListings/read/getAllValid.ts | 2 +- .../directListings/read/getListing.ts | 2 +- .../directListings/read/getTotalCount.ts | 2 +- .../read/isBuyerApprovedForListing.ts | 2 +- .../read/isCurrencyApprovedForListing.ts | 2 +- .../write/approveBuyerForReservedListing.ts | 4 +- .../directListings/write/buyFromListing.ts | 4 +- .../directListings/write/cancelListing.ts | 4 +- .../directListings/write/createListing.ts | 4 +- .../revokeBuyerApprovalForReservedListing.ts | 4 +- .../write/revokeCurrencyApprovalForListing.ts | 4 +- .../directListings/write/updateListing.ts | 4 +- .../englishAuctions/read/getAll.ts | 2 +- .../englishAuctions/read/getAllValid.ts | 2 +- .../englishAuctions/read/getAuction.ts | 2 +- .../englishAuctions/read/getBidBufferBps.ts | 2 +- .../englishAuctions/read/getMinimumNextBid.ts | 2 +- .../englishAuctions/read/getTotalCount.ts | 2 +- .../englishAuctions/read/getWinner.ts | 2 +- .../englishAuctions/read/getWinningBid.ts | 2 +- .../englishAuctions/read/isWinningBid.ts | 2 +- .../englishAuctions/write/buyoutAuction.ts | 4 +- .../englishAuctions/write/cancelAuction.ts | 4 +- .../write/closeAuctionForBidder.ts | 4 +- .../write/closeAuctionForSeller.ts | 4 +- .../englishAuctions/write/createAuction.ts | 4 +- .../englishAuctions/write/executeSale.ts | 4 +- .../englishAuctions/write/makeBid.ts | 4 +- .../marketplaceV3/offers/read/getAll.ts | 2 +- .../marketplaceV3/offers/read/getAllValid.ts | 2 +- .../marketplaceV3/offers/read/getOffer.ts | 2 +- .../offers/read/getTotalCount.ts | 2 +- .../marketplaceV3/offers/write/acceptOffer.ts | 4 +- .../marketplaceV3/offers/write/cancelOffer.ts | 4 +- .../marketplaceV3/offers/write/makeOffer.ts | 4 +- src/server/routes/contract/metadata/abi.ts | 2 +- src/server/routes/contract/metadata/events.ts | 2 +- .../routes/contract/metadata/extensions.ts | 6 +-- .../routes/contract/metadata/functions.ts | 6 +-- src/server/routes/contract/read/read.ts | 4 +- src/server/routes/contract/roles/read/get.ts | 2 +- .../routes/contract/roles/read/getAll.ts | 2 +- .../routes/contract/roles/write/grant.ts | 4 +- .../routes/contract/roles/write/revoke.ts | 4 +- .../royalties/read/getDefaultRoyaltyInfo.ts | 6 +-- .../royalties/read/getTokenRoyaltyInfo.ts | 2 +- .../royalties/write/setDefaultRoyaltyInfo.ts | 8 ++-- .../royalties/write/setTokenRoyaltyInfo.ts | 8 ++-- .../subscriptions/addContractSubscription.ts | 20 ++++----- .../getContractIndexedBlockRange.ts | 2 +- .../subscriptions/getContractSubscriptions.ts | 6 +-- .../contract/subscriptions/getLatestBlock.ts | 2 +- .../removeContractSubscription.ts | 8 ++-- .../transactions/getTransactionReceipts.ts | 8 ++-- .../getTransactionReceiptsByTimestamp.ts | 2 +- .../paginateTransactionReceipts.ts | 4 +- src/server/routes/contract/write/write.ts | 6 +-- src/server/routes/deploy/prebuilt.ts | 10 ++--- src/server/routes/deploy/prebuilts/edition.ts | 10 ++--- .../routes/deploy/prebuilts/editionDrop.ts | 10 ++--- .../routes/deploy/prebuilts/marketplaceV3.ts | 10 ++--- .../routes/deploy/prebuilts/multiwrap.ts | 10 ++--- .../routes/deploy/prebuilts/nftCollection.ts | 10 ++--- src/server/routes/deploy/prebuilts/nftDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/pack.ts | 10 ++--- .../routes/deploy/prebuilts/signatureDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/split.ts | 10 ++--- src/server/routes/deploy/prebuilts/token.ts | 10 ++--- .../routes/deploy/prebuilts/tokenDrop.ts | 10 ++--- src/server/routes/deploy/prebuilts/vote.ts | 10 ++--- src/server/routes/deploy/published.ts | 8 ++-- src/server/routes/relayer/create.ts | 2 +- src/server/routes/relayer/getAll.ts | 2 +- src/server/routes/relayer/index.ts | 8 ++-- src/server/routes/relayer/revoke.ts | 2 +- src/server/routes/relayer/update.ts | 2 +- src/server/routes/system/health.ts | 8 ++-- src/server/routes/system/queue.ts | 6 +-- .../routes/transaction/blockchain/getLogs.ts | 8 ++-- .../transaction/blockchain/getReceipt.ts | 4 +- .../blockchain/getUserOpReceipt.ts | 2 +- .../transaction/blockchain/sendSignedTx.ts | 4 +- .../blockchain/sendSignedUserOp.ts | 4 +- src/server/routes/transaction/cancel.ts | 18 ++++---- src/server/routes/transaction/getAll.ts | 2 +- .../transaction/getAllDeployedContracts.ts | 6 +-- src/server/routes/transaction/retry-failed.ts | 6 +-- src/server/routes/transaction/retry.ts | 10 ++--- src/server/routes/transaction/status.ts | 10 ++--- src/server/routes/transaction/sync-retry.ts | 21 ++++++---- src/server/routes/webhooks/create.ts | 8 ++-- src/server/routes/webhooks/events.ts | 6 +-- src/server/routes/webhooks/getAll.ts | 2 +- src/server/routes/webhooks/revoke.ts | 4 +- src/server/routes/webhooks/test.ts | 4 +- src/server/schemas/transaction/index.ts | 2 +- src/server/schemas/wallet/index.ts | 2 +- src/server/utils/chain.ts | 2 +- src/server/utils/storage/localStorage.ts | 8 ++-- src/server/utils/transactionOverrides.ts | 4 +- .../utils/wallets/createGcpKmsWallet.ts | 6 +-- src/server/utils/wallets/createLocalWallet.ts | 6 +-- src/server/utils/wallets/createSmartWallet.ts | 6 +-- .../utils/wallets/fetchAwsKmsWalletParams.ts | 2 +- .../utils/wallets/fetchGcpKmsWalletParams.ts | 2 +- src/server/utils/wallets/getAwsKmsAccount.ts | 2 +- src/server/utils/wallets/getGcpKmsAccount.ts | 2 +- src/server/utils/wallets/getLocalWallet.ts | 10 ++--- src/server/utils/wallets/getSmartWallet.ts | 6 +-- .../utils/wallets/importAwsKmsWallet.ts | 6 +-- .../utils/wallets/importGcpKmsWallet.ts | 6 +-- src/server/utils/wallets/importLocalWallet.ts | 2 +- src/server/utils/websocket.ts | 12 +++--- .../db/chainIndexers/getChainIndexer.ts | 2 +- .../db/chainIndexers/upsertChainIndexer.ts | 2 +- src/{ => shared}/db/client.ts | 6 +-- .../db/configuration/getConfiguration.ts | 6 +-- .../db/configuration/updateConfiguration.ts | 0 .../createContractEventLogs.ts | 4 +- .../deleteContractEventLogs.ts | 0 .../contractEventLogs/getContractEventLogs.ts | 0 .../createContractSubscription.ts | 0 .../deleteContractSubscription.ts | 0 .../getContractSubscriptions.ts | 0 .../createContractTransactionReceipts.ts | 2 +- .../deleteContractTransactionReceipts.ts | 0 .../getContractTransactionReceipts.ts | 0 src/{ => shared}/db/keypair/delete.ts | 0 src/{ => shared}/db/keypair/get.ts | 0 src/{ => shared}/db/keypair/insert.ts | 6 +-- src/{ => shared}/db/keypair/list.ts | 0 .../db/permissions/deletePermissions.ts | 0 .../db/permissions/getPermissions.ts | 2 +- .../db/permissions/updatePermissions.ts | 0 src/{ => shared}/db/relayer/getRelayerById.ts | 0 src/{ => shared}/db/tokens/createToken.ts | 0 src/{ => shared}/db/tokens/getAccessTokens.ts | 0 src/{ => shared}/db/tokens/getToken.ts | 0 src/{ => shared}/db/tokens/revokeToken.ts | 0 src/{ => shared}/db/tokens/updateToken.ts | 0 src/{ => shared}/db/transactions/db.ts | 0 src/{ => shared}/db/transactions/queueTx.ts | 4 +- .../db/wallets/createWalletDetails.ts | 2 +- .../db/wallets/deleteWalletDetails.ts | 0 src/{ => shared}/db/wallets/getAllWallets.ts | 2 +- .../db/wallets/getWalletDetails.ts | 2 +- src/{ => shared}/db/wallets/nonceMap.ts | 2 +- .../db/wallets/updateWalletDetails.ts | 0 src/{ => shared}/db/wallets/walletNonce.ts | 0 src/{ => shared}/db/webhooks/createWebhook.ts | 2 +- .../db/webhooks/getAllWebhooks.ts | 0 src/{ => shared}/db/webhooks/getWebhook.ts | 0 src/{ => shared}/db/webhooks/revokeWebhook.ts | 0 src/{ => shared}/lib/cache/swr.ts | 0 .../lib/chain/chain-capabilities.ts | 0 .../transaction/get-transaction-receipt.ts | 0 .../auth/index.ts => shared/schemas/auth.ts} | 0 src/{schema => shared/schemas}/config.ts | 0 src/{schema => shared/schemas}/extension.ts | 0 .../keypairs.ts => shared/schemas/keypair.ts} | 4 +- src/{schema => shared/schemas}/prisma.ts | 0 src/{constants => shared/schemas}/relayer.ts | 0 src/{schema => shared/schemas}/wallet.ts | 0 src/{schema => shared/schemas}/webhooks.ts | 0 src/{ => shared}/utils/account.ts | 12 +++--- src/{ => shared}/utils/auth.ts | 0 src/{ => shared}/utils/block.ts | 0 src/{ => shared}/utils/cache/accessToken.ts | 0 src/{ => shared}/utils/cache/authWallet.ts | 0 src/{ => shared}/utils/cache/clearCache.ts | 0 src/{ => shared}/utils/cache/getConfig.ts | 2 +- src/{ => shared}/utils/cache/getContract.ts | 6 +-- src/{ => shared}/utils/cache/getContractv5.ts | 0 src/{ => shared}/utils/cache/getSdk.ts | 2 +- .../utils/cache/getSmartWalletV5.ts | 0 src/{ => shared}/utils/cache/getWallet.ts | 14 +++---- src/{ => shared}/utils/cache/getWebhook.ts | 2 +- src/{ => shared}/utils/cache/keypair.ts | 0 src/{ => shared}/utils/chain.ts | 0 src/{ => shared}/utils/cron/clearCacheCron.ts | 0 src/{ => shared}/utils/cron/isValidCron.ts | 2 +- src/{ => shared}/utils/crypto.ts | 0 src/{ => shared}/utils/date.ts | 0 src/{ => shared}/utils/env.ts | 0 src/{ => shared}/utils/error.ts | 0 src/{ => shared}/utils/ethers.ts | 0 .../utils/indexer/getBlockTime.ts | 0 src/{ => shared}/utils/logger.ts | 0 src/{ => shared}/utils/math.ts | 0 src/{ => shared}/utils/primitiveTypes.ts | 0 src/{ => shared}/utils/prometheus.ts | 2 +- src/{ => shared}/utils/redis/lock.ts | 0 src/{ => shared}/utils/redis/redis.ts | 0 src/{ => shared}/utils/sdk.ts | 0 .../utils/transaction/cancelTransaction.ts | 0 .../utils/transaction/insertTransaction.ts | 8 ++-- .../utils/transaction/queueTransation.ts | 6 +-- .../transaction/simulateQueuedTransaction.ts | 0 src/{ => shared}/utils/transaction/types.ts | 0 src/{ => shared}/utils/transaction/webhook.ts | 4 +- src/{ => shared}/utils/usage.ts | 18 ++++---- src/{ => shared}/utils/webhook.ts | 0 src/{utils => }/tracer.ts | 2 +- src/worker/indexers/chainIndexerRegistry.ts | 4 +- src/worker/listeners/chainIndexerListener.ts | 4 +- src/worker/listeners/configListener.ts | 8 ++-- src/worker/listeners/webhookListener.ts | 6 +-- .../queues/cancelRecycledNoncesQueue.ts | 2 +- src/worker/queues/mineTransactionQueue.ts | 4 +- src/worker/queues/nonceHealthCheckQueue.ts | 2 +- src/worker/queues/nonceResyncQueue.ts | 2 +- src/worker/queues/processEventLogsQueue.ts | 6 +-- .../queues/processTransactionReceiptsQueue.ts | 6 +-- src/worker/queues/pruneTransactionsQueue.ts | 2 +- src/worker/queues/queues.ts | 4 +- src/worker/queues/sendTransactionQueue.ts | 2 +- src/worker/queues/sendWebhookQueue.ts | 8 ++-- .../tasks/cancelRecycledNoncesWorker.ts | 14 +++---- src/worker/tasks/chainIndexer.ts | 14 +++---- src/worker/tasks/manageChainIndexers.ts | 2 +- src/worker/tasks/mineTransactionWorker.ts | 39 ++++++++++-------- src/worker/tasks/nonceHealthCheckWorker.ts | 6 +-- src/worker/tasks/nonceResyncWorker.ts | 14 +++---- src/worker/tasks/processEventLogsWorker.ts | 18 ++++---- .../tasks/processTransactionReceiptsWorker.ts | 18 ++++---- src/worker/tasks/pruneTransactionsWorker.ts | 8 ++-- src/worker/tasks/sendTransactionWorker.ts | 32 +++++++------- src/worker/tasks/sendWebhookWorker.ts | 13 +++--- src/worker/utils/contractId.ts | 2 - src/worker/utils/nonce.ts | 25 ----------- {test => tests}/e2e/.env.test.example | 0 {test => tests}/e2e/.gitignore | 0 {test => tests}/e2e/README.md | 0 {test => tests}/e2e/bun.lockb | Bin {test => tests}/e2e/config.ts | 0 {test => tests}/e2e/package.json | 0 {test => tests}/e2e/scripts/counter.ts | 4 +- {test => tests}/e2e/tests/extensions.test.ts | 2 +- {test => tests}/e2e/tests/load.test.ts | 2 +- {test => tests}/e2e/tests/read.test.ts | 2 +- .../e2e/tests/routes/erc1155-transfer.test.ts | 0 .../e2e/tests/routes/erc20-transfer.test.ts | 2 +- .../e2e/tests/routes/erc721-transfer.test.ts | 0 .../e2e/tests/routes/signMessage.test.ts | 0 .../e2e/tests/routes/signaturePrepare.test.ts | 0 .../e2e/tests/routes/write.test.ts | 8 ++-- {test => tests}/e2e/tests/setup.ts | 2 +- .../e2e/tests/sign-transaction.test.ts | 0 .../smart-aws-wallet.test.ts | 0 .../smart-gcp-wallet.test.ts | 0 .../smart-local-wallet-sdk-v4.test.ts | 0 .../smart-local-wallet.test.ts | 0 {test => tests}/e2e/tests/smoke.test.ts | 0 {test => tests}/e2e/tests/userop.test.ts | 2 +- .../e2e/tests/utils/getBlockTime.test.ts | 0 {test => tests}/e2e/tsconfig.json | 0 {test => tests}/e2e/utils/anvil.ts | 0 {test => tests}/e2e/utils/engine.ts | 2 +- {test => tests}/e2e/utils/statistics.ts | 0 {test => tests}/e2e/utils/transactions.ts | 4 +- {test => tests}/e2e/utils/wallets.ts | 0 {src/tests/config => tests/shared}/aws-kms.ts | 0 {src/tests => tests}/shared/chain.ts | 0 {src/tests => tests}/shared/client.ts | 0 {src/tests/config => tests/shared}/gcp-kms.ts | 0 {src/tests => tests}/shared/typed-data.ts | 0 {src/tests => tests/unit}/auth.test.ts | 27 ++++++------ {src/tests => tests/unit}/aws-arn.test.ts | 2 +- .../wallets => tests/unit}/aws-kms.test.ts | 7 +--- {src/tests => tests/unit}/chain.test.ts | 4 +- .../wallets => tests/unit}/gcp-kms.test.ts | 8 ++-- .../unit}/gcp-resource-path.test.ts | 2 +- {src/tests => tests/unit}/math.test.ts | 28 ++++++------- {src/tests => tests/unit}/schema.test.ts | 4 +- .../unit}/sendTransactionWorker.test.ts | 0 {src/tests => tests/unit}/swr.test.ts | 2 +- {src/tests => tests/unit}/validator.test.ts | 2 +- tsconfig.json | 2 +- vitest.config.ts | 3 +- vitest.global-setup.ts | 28 +++++++------ 445 files changed, 979 insertions(+), 1005 deletions(-) delete mode 100644 .vscode/settings.json rename src/{ => shared}/db/chainIndexers/getChainIndexer.ts (94%) rename src/{ => shared}/db/chainIndexers/upsertChainIndexer.ts (91%) rename src/{ => shared}/db/client.ts (84%) rename src/{ => shared}/db/configuration/getConfiguration.ts (98%) rename src/{ => shared}/db/configuration/updateConfiguration.ts (100%) rename src/{ => shared}/db/contractEventLogs/createContractEventLogs.ts (78%) rename src/{ => shared}/db/contractEventLogs/deleteContractEventLogs.ts (100%) rename src/{ => shared}/db/contractEventLogs/getContractEventLogs.ts (100%) rename src/{ => shared}/db/contractSubscriptions/createContractSubscription.ts (100%) rename src/{ => shared}/db/contractSubscriptions/deleteContractSubscription.ts (100%) rename src/{ => shared}/db/contractSubscriptions/getContractSubscriptions.ts (100%) rename src/{ => shared}/db/contractTransactionReceipts/createContractTransactionReceipts.ts (91%) rename src/{ => shared}/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts (100%) rename src/{ => shared}/db/contractTransactionReceipts/getContractTransactionReceipts.ts (100%) rename src/{ => shared}/db/keypair/delete.ts (100%) rename src/{ => shared}/db/keypair/get.ts (100%) rename src/{ => shared}/db/keypair/insert.ts (72%) rename src/{ => shared}/db/keypair/list.ts (100%) rename src/{ => shared}/db/permissions/deletePermissions.ts (100%) rename src/{ => shared}/db/permissions/getPermissions.ts (92%) rename src/{ => shared}/db/permissions/updatePermissions.ts (100%) rename src/{ => shared}/db/relayer/getRelayerById.ts (100%) rename src/{ => shared}/db/tokens/createToken.ts (100%) rename src/{ => shared}/db/tokens/getAccessTokens.ts (100%) rename src/{ => shared}/db/tokens/getToken.ts (100%) rename src/{ => shared}/db/tokens/revokeToken.ts (100%) rename src/{ => shared}/db/tokens/updateToken.ts (100%) rename src/{ => shared}/db/transactions/db.ts (100%) rename src/{ => shared}/db/transactions/queueTx.ts (95%) rename src/{ => shared}/db/wallets/createWalletDetails.ts (98%) rename src/{ => shared}/db/wallets/deleteWalletDetails.ts (100%) rename src/{ => shared}/db/wallets/getAllWallets.ts (86%) rename src/{ => shared}/db/wallets/getWalletDetails.ts (99%) rename src/{ => shared}/db/wallets/nonceMap.ts (98%) rename src/{ => shared}/db/wallets/updateWalletDetails.ts (100%) rename src/{ => shared}/db/wallets/walletNonce.ts (100%) rename src/{ => shared}/db/webhooks/createWebhook.ts (91%) rename src/{ => shared}/db/webhooks/getAllWebhooks.ts (100%) rename src/{ => shared}/db/webhooks/getWebhook.ts (100%) rename src/{ => shared}/db/webhooks/revokeWebhook.ts (100%) rename src/{ => shared}/lib/cache/swr.ts (100%) rename src/{ => shared}/lib/chain/chain-capabilities.ts (100%) rename src/{ => shared}/lib/transaction/get-transaction-receipt.ts (100%) rename src/{server/schemas/auth/index.ts => shared/schemas/auth.ts} (100%) rename src/{schema => shared/schemas}/config.ts (100%) rename src/{schema => shared/schemas}/extension.ts (100%) rename src/{server/schemas/keypairs.ts => shared/schemas/keypair.ts} (93%) rename src/{schema => shared/schemas}/prisma.ts (100%) rename src/{constants => shared/schemas}/relayer.ts (100%) rename src/{schema => shared/schemas}/wallet.ts (100%) rename src/{schema => shared/schemas}/webhooks.ts (100%) rename src/{ => shared}/utils/account.ts (93%) rename src/{ => shared}/utils/auth.ts (100%) rename src/{ => shared}/utils/block.ts (100%) rename src/{ => shared}/utils/cache/accessToken.ts (100%) rename src/{ => shared}/utils/cache/authWallet.ts (100%) rename src/{ => shared}/utils/cache/clearCache.ts (100%) rename src/{ => shared}/utils/cache/getConfig.ts (86%) rename src/{ => shared}/utils/cache/getContract.ts (82%) rename src/{ => shared}/utils/cache/getContractv5.ts (100%) rename src/{ => shared}/utils/cache/getSdk.ts (97%) rename src/{ => shared}/utils/cache/getSmartWalletV5.ts (100%) rename src/{ => shared}/utils/cache/getWallet.ts (91%) rename src/{ => shared}/utils/cache/getWebhook.ts (91%) rename src/{ => shared}/utils/cache/keypair.ts (100%) rename src/{ => shared}/utils/chain.ts (100%) rename src/{ => shared}/utils/cron/clearCacheCron.ts (100%) rename src/{ => shared}/utils/cron/isValidCron.ts (96%) rename src/{ => shared}/utils/crypto.ts (100%) rename src/{ => shared}/utils/date.ts (100%) rename src/{ => shared}/utils/env.ts (100%) rename src/{ => shared}/utils/error.ts (100%) rename src/{ => shared}/utils/ethers.ts (100%) rename src/{ => shared}/utils/indexer/getBlockTime.ts (100%) rename src/{ => shared}/utils/logger.ts (100%) rename src/{ => shared}/utils/math.ts (100%) rename src/{ => shared}/utils/primitiveTypes.ts (100%) rename src/{ => shared}/utils/prometheus.ts (98%) rename src/{ => shared}/utils/redis/lock.ts (100%) rename src/{ => shared}/utils/redis/redis.ts (100%) rename src/{ => shared}/utils/sdk.ts (100%) rename src/{ => shared}/utils/transaction/cancelTransaction.ts (100%) rename src/{ => shared}/utils/transaction/insertTransaction.ts (95%) rename src/{ => shared}/utils/transaction/queueTransation.ts (90%) rename src/{ => shared}/utils/transaction/simulateQueuedTransaction.ts (100%) rename src/{ => shared}/utils/transaction/types.ts (100%) rename src/{ => shared}/utils/transaction/webhook.ts (80%) rename src/{ => shared}/utils/usage.ts (86%) rename src/{ => shared}/utils/webhook.ts (100%) rename src/{utils => }/tracer.ts (79%) delete mode 100644 src/worker/utils/contractId.ts delete mode 100644 src/worker/utils/nonce.ts rename {test => tests}/e2e/.env.test.example (100%) rename {test => tests}/e2e/.gitignore (100%) rename {test => tests}/e2e/README.md (100%) rename {test => tests}/e2e/bun.lockb (100%) rename {test => tests}/e2e/config.ts (100%) rename {test => tests}/e2e/package.json (100%) rename {test => tests}/e2e/scripts/counter.ts (90%) rename {test => tests}/e2e/tests/extensions.test.ts (98%) rename {test => tests}/e2e/tests/load.test.ts (98%) rename {test => tests}/e2e/tests/read.test.ts (99%) rename {test => tests}/e2e/tests/routes/erc1155-transfer.test.ts (100%) rename {test => tests}/e2e/tests/routes/erc20-transfer.test.ts (99%) rename {test => tests}/e2e/tests/routes/erc721-transfer.test.ts (100%) rename {test => tests}/e2e/tests/routes/signMessage.test.ts (100%) rename {test => tests}/e2e/tests/routes/signaturePrepare.test.ts (100%) rename {test => tests}/e2e/tests/routes/write.test.ts (97%) rename {test => tests}/e2e/tests/setup.ts (96%) rename {test => tests}/e2e/tests/sign-transaction.test.ts (100%) rename {test => tests}/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts (100%) rename {test => tests}/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts (100%) rename {test => tests}/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts (100%) rename {test => tests}/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts (100%) rename {test => tests}/e2e/tests/smoke.test.ts (100%) rename {test => tests}/e2e/tests/userop.test.ts (98%) rename {test => tests}/e2e/tests/utils/getBlockTime.test.ts (100%) rename {test => tests}/e2e/tsconfig.json (100%) rename {test => tests}/e2e/utils/anvil.ts (100%) rename {test => tests}/e2e/utils/engine.ts (95%) rename {test => tests}/e2e/utils/statistics.ts (100%) rename {test => tests}/e2e/utils/transactions.ts (95%) rename {test => tests}/e2e/utils/wallets.ts (100%) rename {src/tests/config => tests/shared}/aws-kms.ts (100%) rename {src/tests => tests}/shared/chain.ts (100%) rename {src/tests => tests}/shared/client.ts (100%) rename {src/tests/config => tests/shared}/gcp-kms.ts (100%) rename {src/tests => tests}/shared/typed-data.ts (100%) rename {src/tests => tests/unit}/auth.test.ts (96%) rename {src/tests => tests/unit}/aws-arn.test.ts (97%) rename {src/tests/wallets => tests/unit}/aws-kms.test.ts (95%) rename {src/tests => tests/unit}/chain.test.ts (96%) rename {src/tests/wallets => tests/unit}/gcp-kms.test.ts (94%) rename {src/tests => tests/unit}/gcp-resource-path.test.ts (97%) rename {src/tests => tests/unit}/math.test.ts (78%) rename {src/tests => tests/unit}/schema.test.ts (97%) rename {src/tests => tests/unit}/sendTransactionWorker.test.ts (100%) rename {src/tests => tests/unit}/swr.test.ts (98%) rename {src/tests => tests/unit}/validator.test.ts (94%) diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 3bbcfc60d..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "editor.codeActionsOnSave": { - "source.organizeImports": "explicit", - "source.eslint.fixAll": "explicit" - }, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, - "eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }], - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true, - "[prisma]": { - "editor.defaultFormatter": "Prisma.prisma" - }, - "[typescript]": { - "editor.defaultFormatter": "biomejs.biome" - } -} diff --git a/src/index.ts b/src/index.ts index f2f48a96e..9e2ea9b37 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,9 @@ import "./polyfill"; +import "./tracer"; + import { initServer } from "./server"; -import { env } from "./utils/env"; -import { logger } from "./utils/logger"; -import "./utils/tracer"; +import { env } from "./shared/utils/env"; +import { logger } from "./shared/utils/logger"; import { initWorker } from "./worker"; import { CancelRecycledNoncesQueue } from "./worker/queues/cancelRecycledNoncesQueue"; import { MineTransactionQueue } from "./worker/queues/mineTransactionQueue"; diff --git a/src/polyfill.ts b/src/polyfill.ts index 103de544e..029207c32 100644 --- a/src/polyfill.ts +++ b/src/polyfill.ts @@ -1,4 +1,4 @@ -import * as crypto from "crypto"; +import * as crypto from "node:crypto"; if (typeof globalThis.crypto === "undefined") { (globalThis as any).crypto = crypto; diff --git a/src/scripts/apply-migrations.ts b/src/scripts/apply-migrations.ts index cda3af90c..2c12f0915 100644 --- a/src/scripts/apply-migrations.ts +++ b/src/scripts/apply-migrations.ts @@ -1,6 +1,10 @@ -import { logger } from "../utils/logger"; -import { acquireLock, releaseLock, waitForLock } from "../utils/redis/lock"; -import { redis } from "../utils/redis/redis"; +import { logger } from "../shared/utils/logger"; +import { + acquireLock, + releaseLock, + waitForLock, +} from "../shared/utils/redis/lock"; +import { redis } from "../shared/utils/redis/redis"; const MIGRATION_LOCK_TTL_SECONDS = 60; diff --git a/src/scripts/setup-db.ts b/src/scripts/setup-db.ts index 80d992fd9..d38542756 100644 --- a/src/scripts/setup-db.ts +++ b/src/scripts/setup-db.ts @@ -1,5 +1,5 @@ -import { execSync } from "child_process"; -import { prisma } from "../db/client"; +import { execSync } from "node:child_process"; +import { prisma } from "../shared/db/client"; const main = async () => { const [{ exists: hasWalletsTable }]: [{ exists: boolean }] = @@ -14,8 +14,8 @@ const main = async () => { const schema = process.env.NODE_ENV === "production" - ? `./dist/prisma/schema.prisma` - : `./src/prisma/schema.prisma`; + ? "./dist/prisma/schema.prisma" + : "./src/prisma/schema.prisma"; if (hasWalletsTable) { execSync(`yarn prisma migrate reset --force --schema ${schema}`, { diff --git a/src/server/index.ts b/src/server/index.ts index 4b6deb374..a0a576dfc 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -3,11 +3,11 @@ import fastify, { type FastifyInstance } from "fastify"; import * as fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; -import { clearCacheCron } from "../utils/cron/clearCacheCron"; -import { env } from "../utils/env"; -import { logger } from "../utils/logger"; -import { metricsServer } from "../utils/prometheus"; -import { withServerUsageReporting } from "../utils/usage"; +import { clearCacheCron } from "../shared/utils/cron/clearCacheCron"; +import { env } from "../shared/utils/env"; +import { logger } from "../shared/utils/logger"; +import { metricsServer } from "../shared/utils/prometheus"; +import { withServerUsageReporting } from "../shared/utils/usage"; import { updateTxListener } from "./listeners/updateTxListener"; import { withAdminRoutes } from "./middleware/adminRoutes"; import { withAuth } from "./middleware/auth"; diff --git a/src/server/listeners/updateTxListener.ts b/src/server/listeners/updateTxListener.ts index d8ff01ebf..150a41650 100644 --- a/src/server/listeners/updateTxListener.ts +++ b/src/server/listeners/updateTxListener.ts @@ -1,6 +1,6 @@ -import { knex } from "../../db/client"; -import { TransactionDB } from "../../db/transactions/db"; -import { logger } from "../../utils/logger"; +import { knex } from "../../shared/db/client"; +import { TransactionDB } from "../../shared/db/transactions/db"; +import { logger } from "../../shared/utils/logger"; import { toTransactionSchema } from "../schemas/transaction"; import { subscriptionsData } from "../schemas/websocket"; import { diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/adminRoutes.ts index 13b01630a..6f577d22c 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/adminRoutes.ts @@ -5,7 +5,7 @@ import type { Queue } from "bullmq"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { timingSafeEqual } from "node:crypto"; -import { env } from "../../utils/env"; +import { env } from "../../shared/utils/env"; import { CancelRecycledNoncesQueue } from "../../worker/queues/cancelRecycledNoncesQueue"; import { MineTransactionQueue } from "../../worker/queues/mineTransactionQueue"; import { NonceHealthCheckQueue } from "../../worker/queues/nonceHealthCheckQueue"; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 19883aa98..022519a41 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -5,25 +5,25 @@ import { type ThirdwebAuthUser, } from "@thirdweb-dev/auth/fastify"; import { AsyncWallet } from "@thirdweb-dev/wallets/evm/wallets/async"; -import { createHash } from "crypto"; +import { createHash } from "node:crypto"; 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 "../../db/permissions/getPermissions"; -import { createToken } from "../../db/tokens/createToken"; -import { revokeToken } from "../../db/tokens/revokeToken"; -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../../utils/auth"; -import { getAccessToken } from "../../utils/cache/accessToken"; -import { getAuthWallet } from "../../utils/cache/authWallet"; -import { getConfig } from "../../utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; -import { getKeypair } from "../../utils/cache/keypair"; -import { env } from "../../utils/env"; -import { logger } from "../../utils/logger"; -import { sendWebhookRequest } from "../../utils/webhook"; -import { Permission } from "../schemas/auth"; +import { getPermissions } from "../../shared/db/permissions/getPermissions"; +import { createToken } from "../../shared/db/tokens/createToken"; +import { revokeToken } from "../../shared/db/tokens/revokeToken"; +import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; +import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../../shared/utils/auth"; +import { getAccessToken } from "../../shared/utils/cache/accessToken"; +import { getAuthWallet } from "../../shared/utils/cache/authWallet"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { getKeypair } from "../../shared/utils/cache/keypair"; +import { env } from "../../shared/utils/env"; +import { logger } from "../../shared/utils/logger"; +import { sendWebhookRequest } from "../../shared/utils/webhook"; +import { Permission } from "../../shared/schemas/auth"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/cors.ts b/src/server/middleware/cors.ts index ce9997a52..da81b02fa 100644 --- a/src/server/middleware/cors.ts +++ b/src/server/middleware/cors.ts @@ -1,5 +1,5 @@ import type { FastifyInstance } from "fastify"; -import { getConfig } from "../../utils/cache/getConfig"; +import { getConfig } from "../../shared/utils/cache/getConfig"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; const STANDARD_METHODS = "GET,POST,DELETE,PUT,PATCH,HEAD,PUT,PATCH,POST,DELETE"; diff --git a/src/server/middleware/engineMode.ts b/src/server/middleware/engineMode.ts index c111c5fdd..9abd2c220 100644 --- a/src/server/middleware/engineMode.ts +++ b/src/server/middleware/engineMode.ts @@ -1,5 +1,5 @@ import type { FastifyInstance } from "fastify"; -import { env } from "../../utils/env"; +import { env } from "../../shared/utils/env"; export function withEnforceEngineMode(server: FastifyInstance) { if (env.ENGINE_MODE === "sandbox") { diff --git a/src/server/middleware/error.ts b/src/server/middleware/error.ts index 5b321cbfd..f993750f9 100644 --- a/src/server/middleware/error.ts +++ b/src/server/middleware/error.ts @@ -1,8 +1,8 @@ import type { FastifyInstance } from "fastify"; import { ReasonPhrases, StatusCodes } from "http-status-codes"; import { ZodError } from "zod"; -import { env } from "../../utils/env"; -import { parseEthersError } from "../../utils/ethers"; +import { env } from "../../shared/utils/env"; +import { parseEthersError } from "../../shared/utils/ethers"; export type CustomError = { message: string; diff --git a/src/server/middleware/logs.ts b/src/server/middleware/logs.ts index e5ed3a6b5..3ba0cfaf7 100644 --- a/src/server/middleware/logs.ts +++ b/src/server/middleware/logs.ts @@ -1,6 +1,6 @@ import type { FastifyInstance } from "fastify"; import { stringify } from "thirdweb/utils"; -import { logger } from "../../utils/logger"; +import { logger } from "../../shared/utils/logger"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/prometheus.ts b/src/server/middleware/prometheus.ts index 64bae9d49..29a54b252 100644 --- a/src/server/middleware/prometheus.ts +++ b/src/server/middleware/prometheus.ts @@ -1,6 +1,6 @@ import type { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; -import { env } from "../../utils/env"; -import { recordMetrics } from "../../utils/prometheus"; +import { env } from "../../shared/utils/env"; +import { recordMetrics } from "../../shared/utils/prometheus"; export function withPrometheus(server: FastifyInstance) { if (!env.METRICS_ENABLED) { diff --git a/src/server/middleware/rateLimit.ts b/src/server/middleware/rateLimit.ts index 97c3f72cd..96911855a 100644 --- a/src/server/middleware/rateLimit.ts +++ b/src/server/middleware/rateLimit.ts @@ -1,7 +1,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../utils/env"; -import { redis } from "../../utils/redis/redis"; +import { env } from "../../shared/utils/env"; +import { redis } from "../../shared/utils/redis/redis"; import { createCustomError } from "./error"; import { OPENAPI_ROUTES } from "./openApi"; diff --git a/src/server/middleware/websocket.ts b/src/server/middleware/websocket.ts index 6c7ebceef..b84363dd3 100644 --- a/src/server/middleware/websocket.ts +++ b/src/server/middleware/websocket.ts @@ -1,6 +1,6 @@ import WebSocketPlugin from "@fastify/websocket"; import type { FastifyInstance } from "fastify"; -import { logger } from "../../utils/logger"; +import { logger } from "../../shared/utils/logger"; export async function withWebSocket(server: FastifyInstance) { await server.register(WebSocketPlugin, { diff --git a/src/server/routes/admin/nonces.ts b/src/server/routes/admin/nonces.ts index 2a2f528d3..75e109405 100644 --- a/src/server/routes/admin/nonces.ts +++ b/src/server/routes/admin/nonces.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { - Address, + type Address, eth_getTransactionCount, getAddress, getRpcClient, @@ -12,10 +12,10 @@ import { lastUsedNonceKey, recycledNoncesKey, sentNoncesKey, -} from "../../../db/wallets/walletNonce"; -import { getChain } from "../../../utils/chain"; -import { redis } from "../../../utils/redis/redis"; -import { thirdwebClient } from "../../../utils/sdk"; +} from "../../../shared/db/wallets/walletNonce"; +import { getChain } from "../../../shared/utils/chain"; +import { redis } from "../../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/admin/transaction.ts b/src/server/routes/admin/transaction.ts index 5827e5d24..d8eace0b7 100644 --- a/src/server/routes/admin/transaction.ts +++ b/src/server/routes/admin/transaction.ts @@ -1,12 +1,12 @@ -import { Static, Type } from "@sinclair/typebox"; -import { Queue } from "bullmq"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { Queue } from "bullmq"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { stringify } from "thirdweb/utils"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getConfig } from "../../../utils/cache/getConfig"; -import { maybeDate } from "../../../utils/primitiveTypes"; -import { redis } from "../../../utils/redis/redis"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { maybeDate } from "../../../shared/utils/primitiveTypes"; +import { redis } from "../../../shared/utils/redis/redis"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/auth/access-tokens/create.ts b/src/server/routes/auth/access-tokens/create.ts index 9c33113cd..b69b6cf20 100644 --- a/src/server/routes/auth/access-tokens/create.ts +++ b/src/server/routes/auth/access-tokens/create.ts @@ -3,11 +3,11 @@ 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 "../../../../db/configuration/updateConfiguration"; -import { createToken } from "../../../../db/tokens/createToken"; -import { accessTokenCache } from "../../../../utils/cache/accessToken"; -import { getConfig } from "../../../../utils/cache/getConfig"; -import { env } from "../../../../utils/env"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { createToken } from "../../../../shared/db/tokens/createToken"; +import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { env } from "../../../../shared/utils/env"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { AccessTokenSchema } from "./getAll"; diff --git a/src/server/routes/auth/access-tokens/getAll.ts b/src/server/routes/auth/access-tokens/getAll.ts index 181f35ec8..9cbe3646b 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 "../../../../db/tokens/getAccessTokens"; +import { getAccessTokens } from "../../../../shared/db/tokens/getAccessTokens"; 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 2d509bb65..39aad0a00 100644 --- a/src/server/routes/auth/access-tokens/revoke.ts +++ b/src/server/routes/auth/access-tokens/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 { revokeToken } from "../../../../db/tokens/revokeToken"; -import { accessTokenCache } from "../../../../utils/cache/accessToken"; +import { revokeToken } from "../../../../shared/db/tokens/revokeToken"; +import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/access-tokens/update.ts b/src/server/routes/auth/access-tokens/update.ts index a5d730fdb..f09b5ce5f 100644 --- a/src/server/routes/auth/access-tokens/update.ts +++ b/src/server/routes/auth/access-tokens/update.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateToken } from "../../../../db/tokens/updateToken"; -import { accessTokenCache } from "../../../../utils/cache/accessToken"; +import { updateToken } from "../../../../shared/db/tokens/updateToken"; +import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/add.ts b/src/server/routes/auth/keypair/add.ts index 3ecc24364..2aab345ba 100644 --- a/src/server/routes/auth/keypair/add.ts +++ b/src/server/routes/auth/keypair/add.ts @@ -1,15 +1,15 @@ -import { Keypairs, Prisma } from "@prisma/client"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Keypairs, Prisma } from "@prisma/client"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { insertKeypair } from "../../../../db/keypair/insert"; -import { isWellFormedPublicKey } from "../../../../utils/crypto"; +import { insertKeypair } from "../../../../shared/db/keypair/insert"; +import { isWellFormedPublicKey } from "../../../../shared/utils/crypto"; import { createCustomError } from "../../../middleware/error"; import { KeypairAlgorithmSchema, KeypairSchema, toKeypairSchema, -} from "../../../schemas/keypairs"; +} from "../../../../shared/schemas/keypair"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/list.ts b/src/server/routes/auth/keypair/list.ts index 8c4395f0e..81fab4e68 100644 --- a/src/server/routes/auth/keypair/list.ts +++ b/src/server/routes/auth/keypair/list.ts @@ -1,8 +1,11 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { listKeypairs } from "../../../../db/keypair/list"; -import { KeypairSchema, toKeypairSchema } from "../../../schemas/keypairs"; +import { listKeypairs } from "../../../../shared/db/keypair/list"; +import { + KeypairSchema, + toKeypairSchema, +} from "../../../../shared/schemas/keypair"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/auth/keypair/remove.ts b/src/server/routes/auth/keypair/remove.ts index 939979d52..6cc65f2ff 100644 --- a/src/server/routes/auth/keypair/remove.ts +++ b/src/server/routes/auth/keypair/remove.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { deleteKeypair } from "../../../../db/keypair/delete"; -import { keypairCache } from "../../../../utils/cache/keypair"; +import { deleteKeypair } from "../../../../shared/db/keypair/delete"; +import { keypairCache } from "../../../../shared/utils/cache/keypair"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/permissions/getAll.ts b/src/server/routes/auth/permissions/getAll.ts index 7a4f5d4a4..22e4b1478 100644 --- a/src/server/routes/auth/permissions/getAll.ts +++ b/src/server/routes/auth/permissions/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 { prisma } from "../../../../db/client"; +import { prisma } from "../../../../shared/db/client"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/auth/permissions/grant.ts b/src/server/routes/auth/permissions/grant.ts index 6f9ef49ee..fcde00839 100644 --- a/src/server/routes/auth/permissions/grant.ts +++ b/src/server/routes/auth/permissions/grant.ts @@ -1,9 +1,9 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updatePermissions } from "../../../../db/permissions/updatePermissions"; +import { updatePermissions } from "../../../../shared/db/permissions/updatePermissions"; import { AddressSchema } from "../../../schemas/address"; -import { permissionsSchema } from "../../../schemas/auth"; +import { permissionsSchema } from "../../../../shared/schemas/auth"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/permissions/revoke.ts b/src/server/routes/auth/permissions/revoke.ts index 08f1609bb..6e72d7364 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 "../../../../db/permissions/deletePermissions"; +import { deletePermissions } from "../../../../shared/db/permissions/deletePermissions"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/cancel-nonces.ts b/src/server/routes/backend-wallet/cancel-nonces.ts index cb4f6cf73..47803817c 100644 --- a/src/server/routes/backend-wallet/cancel-nonces.ts +++ b/src/server/routes/backend-wallet/cancel-nonces.ts @@ -3,9 +3,9 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_getTransactionCount, getRpcClient } from "thirdweb"; import { checksumAddress } from "thirdweb/utils"; -import { getChain } from "../../../utils/chain"; -import { thirdwebClient } from "../../../utils/sdk"; -import { sendCancellationTransaction } from "../../../utils/transaction/cancelTransaction"; +import { getChain } from "../../../shared/utils/chain"; +import { thirdwebClient } from "../../../shared/utils/sdk"; +import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancelTransaction"; import { requestQuerystringSchema, standardResponseSchema, diff --git a/src/server/routes/backend-wallet/create.ts b/src/server/routes/backend-wallet/create.ts index c25ff560c..64162c5d0 100644 --- a/src/server/routes/backend-wallet/create.ts +++ b/src/server/routes/backend-wallet/create.ts @@ -6,8 +6,8 @@ import { DEFAULT_ACCOUNT_FACTORY_V0_7, ENTRYPOINT_ADDRESS_v0_7, } from "thirdweb/wallets/smart"; -import { WalletType } from "../../../schema/wallet"; -import { getConfig } from "../../../utils/cache/getConfig"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../middleware/error"; 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 a9a9b1a48..0a2b0e36f 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 "../../../db/wallets/getAllWallets"; +import { getAllWallets } from "../../../shared/db/wallets/getAllWallets"; import { standardResponseSchema, walletDetailsSchema, diff --git a/src/server/routes/backend-wallet/getBalance.ts b/src/server/routes/backend-wallet/getBalance.ts index 45a9987af..01f262991 100644 --- a/src/server/routes/backend-wallet/getBalance.ts +++ b/src/server/routes/backend-wallet/getBalance.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getSdk } from "../../../utils/cache/getSdk"; +import { getSdk } from "../../../shared/utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { currencyValueSchema, diff --git a/src/server/routes/backend-wallet/getNonce.ts b/src/server/routes/backend-wallet/getNonce.ts index 593cc9ed9..f5ef87ac3 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 "../../../db/wallets/walletNonce"; +import { inspectNonce } from "../../../shared/db/wallets/walletNonce"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; diff --git a/src/server/routes/backend-wallet/getTransactions.ts b/src/server/routes/backend-wallet/getTransactions.ts index 5e8dcf89e..24a215697 100644 --- a/src/server/routes/backend-wallet/getTransactions.ts +++ b/src/server/routes/backend-wallet/getTransactions.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAddress } from "thirdweb"; -import { TransactionDB } from "../../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { PaginationSchema } from "../../schemas/pagination"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/backend-wallet/getTransactionsByNonce.ts b/src/server/routes/backend-wallet/getTransactionsByNonce.ts index b804df6aa..0be1571d3 100644 --- a/src/server/routes/backend-wallet/getTransactionsByNonce.ts +++ b/src/server/routes/backend-wallet/getTransactionsByNonce.ts @@ -1,10 +1,10 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getNonceMap } from "../../../db/wallets/nonceMap"; -import { normalizeAddress } from "../../../utils/primitiveTypes"; -import type { AnyTransaction } from "../../../utils/transaction/types"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getNonceMap } from "../../../shared/db/wallets/nonceMap"; +import { normalizeAddress } from "../../../shared/utils/primitiveTypes"; +import type { AnyTransaction } from "../../../shared/utils/transaction/types"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { TransactionSchema, diff --git a/src/server/routes/backend-wallet/import.ts b/src/server/routes/backend-wallet/import.ts index 510059a14..88a93d48b 100644 --- a/src/server/routes/backend-wallet/import.ts +++ b/src/server/routes/backend-wallet/import.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/remove.ts b/src/server/routes/backend-wallet/remove.ts index 431c118d8..9f57ace6c 100644 --- a/src/server/routes/backend-wallet/remove.ts +++ b/src/server/routes/backend-wallet/remove.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { deleteWalletDetails } from "../../../db/wallets/deleteWalletDetails"; +import type { Address } from "thirdweb"; +import { deleteWalletDetails } from "../../../shared/db/wallets/deleteWalletDetails"; 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 0ec4c30e8..3237a161a 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 "../../../db/wallets/walletNonce"; +} from "../../../shared/db/wallets/walletNonce"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/sendTransaction.ts b/src/server/routes/backend-wallet/sendTransaction.ts index bb29f9386..d23add987 100644 --- a/src/server/routes/backend-wallet/sendTransaction.ts +++ b/src/server/routes/backend-wallet/sendTransaction.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, Hex } from "thirdweb"; -import { insertTransaction } from "../../../utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; import { AddressSchema } from "../../schemas/address"; import { requestQuerystringSchema, diff --git a/src/server/routes/backend-wallet/sendTransactionBatch.ts b/src/server/routes/backend-wallet/sendTransactionBatch.ts index 3d69c4431..d887e9bed 100644 --- a/src/server/routes/backend-wallet/sendTransactionBatch.ts +++ b/src/server/routes/backend-wallet/sendTransactionBatch.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, Hex } from "thirdweb"; -import { insertTransaction } from "../../../utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { txOverridesWithValueSchema } from "../../schemas/txOverrides"; diff --git a/src/server/routes/backend-wallet/signMessage.ts b/src/server/routes/backend-wallet/signMessage.ts index ac810a795..45f9cb69d 100644 --- a/src/server/routes/backend-wallet/signMessage.ts +++ b/src/server/routes/backend-wallet/signMessage.ts @@ -6,9 +6,9 @@ import { arbitrumSepolia } from "thirdweb/chains"; import { getWalletDetails, isSmartBackendWallet, -} from "../../../db/wallets/getWalletDetails"; -import { walletDetailsToAccount } from "../../../utils/account"; -import { getChain } from "../../../utils/chain"; +} from "../../../shared/db/wallets/getWalletDetails"; +import { walletDetailsToAccount } from "../../../shared/utils/account"; +import { getChain } from "../../../shared/utils/chain"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/signTransaction.ts b/src/server/routes/backend-wallet/signTransaction.ts index c6a73c2c2..7af06715e 100644 --- a/src/server/routes/backend-wallet/signTransaction.ts +++ b/src/server/routes/backend-wallet/signTransaction.ts @@ -2,13 +2,13 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Hex } from "thirdweb"; -import { getAccount } from "../../../utils/account"; +import { getAccount } from "../../../shared/utils/account"; import { getChecksumAddress, maybeBigInt, maybeInt, -} from "../../../utils/primitiveTypes"; -import { toTransactionType } from "../../../utils/sdk"; +} from "../../../shared/utils/primitiveTypes"; +import { toTransactionType } from "../../../shared/utils/sdk"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/signTypedData.ts b/src/server/routes/backend-wallet/signTypedData.ts index 6c4705eea..6033e309b 100644 --- a/src/server/routes/backend-wallet/signTypedData.ts +++ b/src/server/routes/backend-wallet/signTypedData.ts @@ -1,8 +1,8 @@ import type { TypedDataSigner } from "@ethersproject/abstract-signer"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getWallet } from "../../../utils/cache/getWallet"; +import { getWallet } from "../../../shared/utils/cache/getWallet"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/simulateTransaction.ts b/src/server/routes/backend-wallet/simulateTransaction.ts index e30e5d662..eec049d0f 100644 --- a/src/server/routes/backend-wallet/simulateTransaction.ts +++ b/src/server/routes/backend-wallet/simulateTransaction.ts @@ -3,8 +3,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; import type { Address, Hex } from "thirdweb"; -import { doSimulateTransaction } from "../../../utils/transaction/simulateQueuedTransaction"; -import type { QueuedTransaction } from "../../../utils/transaction/types"; +import { doSimulateTransaction } from "../../../shared/utils/transaction/simulateQueuedTransaction"; +import type { QueuedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; import { diff --git a/src/server/routes/backend-wallet/transfer.ts b/src/server/routes/backend-wallet/transfer.ts index d45b6cd28..98a1f6fb4 100644 --- a/src/server/routes/backend-wallet/transfer.ts +++ b/src/server/routes/backend-wallet/transfer.ts @@ -10,11 +10,11 @@ import { } from "thirdweb"; import { transfer as transferERC20 } from "thirdweb/extensions/erc20"; import { isContractDeployed, resolvePromisedValue } from "thirdweb/utils"; -import { getChain } from "../../../utils/chain"; -import { normalizeAddress } from "../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../utils/sdk"; -import { insertTransaction } from "../../../utils/transaction/insertTransaction"; -import type { InsertedTransaction } from "../../../utils/transaction/types"; +import { getChain } from "../../../shared/utils/chain"; +import { normalizeAddress } from "../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../shared/utils/sdk"; +import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; +import type { InsertedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; import { TokenAmountStringSchema } from "../../schemas/number"; diff --git a/src/server/routes/backend-wallet/update.ts b/src/server/routes/backend-wallet/update.ts index 5c916d8d8..8baabfacf 100644 --- a/src/server/routes/backend-wallet/update.ts +++ b/src/server/routes/backend-wallet/update.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateWalletDetails } from "../../../db/wallets/updateWalletDetails"; +import { updateWalletDetails } from "../../../shared/db/wallets/updateWalletDetails"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/withdraw.ts b/src/server/routes/backend-wallet/withdraw.ts index e7815ac72..0cfe6fe36 100644 --- a/src/server/routes/backend-wallet/withdraw.ts +++ b/src/server/routes/backend-wallet/withdraw.ts @@ -9,12 +9,12 @@ import { } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { getWalletBalance } from "thirdweb/wallets"; -import { getAccount } from "../../../utils/account"; -import { getChain } from "../../../utils/chain"; -import { logger } from "../../../utils/logger"; -import { getChecksumAddress } from "../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../utils/sdk"; -import type { PopulatedTransaction } from "../../../utils/transaction/types"; +import { getAccount } from "../../../shared/utils/account"; +import { getChain } from "../../../shared/utils/chain"; +import { logger } from "../../../shared/utils/logger"; +import { getChecksumAddress } from "../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../shared/utils/sdk"; +import type { PopulatedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../schemas/address"; import { TokenAmountStringSchema } from "../../schemas/number"; diff --git a/src/server/routes/chain/get.ts b/src/server/routes/chain/get.ts index b01c90bed..c271613a3 100644 --- a/src/server/routes/chain/get.ts +++ b/src/server/routes/chain/get.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getChainMetadata } from "thirdweb/chains"; -import { getChain } from "../../../utils/chain"; +import { getChain } from "../../../shared/utils/chain"; import { chainRequestQuerystringSchema, chainResponseSchema, diff --git a/src/server/routes/chain/getAll.ts b/src/server/routes/chain/getAll.ts index e1b85cf0d..c5644f337 100644 --- a/src/server/routes/chain/getAll.ts +++ b/src/server/routes/chain/getAll.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { fetchChains } from "@thirdweb-dev/chains"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; import { chainResponseSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/auth/get.ts b/src/server/routes/configuration/auth/get.ts index 9f8bc0f32..23163fa35 100644 --- a/src/server/routes/configuration/auth/get.ts +++ b/src/server/routes/configuration/auth/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/auth/update.ts b/src/server/routes/configuration/auth/update.ts index 411dd683f..07ab148b3 100644 --- a/src/server/routes/configuration/auth/update.ts +++ b/src/server/routes/configuration/auth/update.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +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/get.ts b/src/server/routes/configuration/backend-wallet-balance/get.ts index 1fce8a8ee..ab430ecc4 100644 --- a/src/server/routes/configuration/backend-wallet-balance/get.ts +++ b/src/server/routes/configuration/backend-wallet-balance/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/backend-wallet-balance/update.ts b/src/server/routes/configuration/backend-wallet-balance/update.ts index edb386e9d..e47a75af6 100644 --- a/src/server/routes/configuration/backend-wallet-balance/update.ts +++ b/src/server/routes/configuration/backend-wallet-balance/update.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { WeiAmountStringSchema } from "../../../schemas/number"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cache/get.ts b/src/server/routes/configuration/cache/get.ts index 2d4542585..5ff178bd0 100644 --- a/src/server/routes/configuration/cache/get.ts +++ b/src/server/routes/configuration/cache/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/cache/update.ts b/src/server/routes/configuration/cache/update.ts index 96d34db0b..a87ef1546 100644 --- a/src/server/routes/configuration/cache/update.ts +++ b/src/server/routes/configuration/cache/update.ts @@ -1,10 +1,10 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; -import { clearCacheCron } from "../../../../utils/cron/clearCacheCron"; -import { isValidCron } from "../../../../utils/cron/isValidCron"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { clearCacheCron } from "../../../../shared/utils/cron/clearCacheCron"; +import { isValidCron } from "../../../../shared/utils/cron/isValidCron"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/chains/get.ts b/src/server/routes/configuration/chains/get.ts index 588927206..6b38f9139 100644 --- a/src/server/routes/configuration/chains/get.ts +++ b/src/server/routes/configuration/chains/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { chainResponseSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/chains/update.ts b/src/server/routes/configuration/chains/update.ts index 5ae3ed225..589eb0797 100644 --- a/src/server/routes/configuration/chains/update.ts +++ b/src/server/routes/configuration/chains/update.ts @@ -1,9 +1,9 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; -import { sdkCache } from "../../../../utils/cache/getSdk"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { sdkCache } from "../../../../shared/utils/cache/getSdk"; import { chainResponseSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/contract-subscriptions/get.ts b/src/server/routes/configuration/contract-subscriptions/get.ts index 36d42d582..ae6dc97dc 100644 --- a/src/server/routes/configuration/contract-subscriptions/get.ts +++ b/src/server/routes/configuration/contract-subscriptions/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { contractSubscriptionConfigurationSchema, standardResponseSchema, diff --git a/src/server/routes/configuration/contract-subscriptions/update.ts b/src/server/routes/configuration/contract-subscriptions/update.ts index 501ce8b4b..fdc0897d0 100644 --- a/src/server/routes/configuration/contract-subscriptions/update.ts +++ b/src/server/routes/configuration/contract-subscriptions/update.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { contractSubscriptionConfigurationSchema, diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index aace6cb26..24d085d07 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cors/get.ts b/src/server/routes/configuration/cors/get.ts index 37a1aa9bb..f5cbab52b 100644 --- a/src/server/routes/configuration/cors/get.ts +++ b/src/server/routes/configuration/cors/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +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 d32a819ef..a1d4c7c98 100644 --- a/src/server/routes/configuration/cors/remove.ts +++ b/src/server/routes/configuration/cors/remove.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index 54ddf3e84..a1a7540bc 100644 --- a/src/server/routes/configuration/cors/set.ts +++ b/src/server/routes/configuration/cors/set.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/ip/get.ts b/src/server/routes/configuration/ip/get.ts index 99250011e..1f916c14f 100644 --- a/src/server/routes/configuration/ip/get.ts +++ b/src/server/routes/configuration/ip/get.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/ip/set.ts b/src/server/routes/configuration/ip/set.ts index e92a319ce..8dab64868 100644 --- a/src/server/routes/configuration/ip/set.ts +++ b/src/server/routes/configuration/ip/set.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/transactions/get.ts b/src/server/routes/configuration/transactions/get.ts index 33cdfeac3..c1d95ff5e 100644 --- a/src/server/routes/configuration/transactions/get.ts +++ b/src/server/routes/configuration/transactions/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/transactions/update.ts b/src/server/routes/configuration/transactions/update.ts index c94db43ce..c5322dca4 100644 --- a/src/server/routes/configuration/transactions/update.ts +++ b/src/server/routes/configuration/transactions/update.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Partial( diff --git a/src/server/routes/configuration/wallets/get.ts b/src/server/routes/configuration/wallets/get.ts index d170cbea5..eded75a5e 100644 --- a/src/server/routes/configuration/wallets/get.ts +++ b/src/server/routes/configuration/wallets/get.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { WalletType } from "../../../../schema/wallet"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { WalletType } from "../../../../shared/schemas/wallet"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/wallets/update.ts b/src/server/routes/configuration/wallets/update.ts index d21182227..9b79e6146 100644 --- a/src/server/routes/configuration/wallets/update.ts +++ b/src/server/routes/configuration/wallets/update.ts @@ -1,9 +1,9 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; -import { WalletType } from "../../../../schema/wallet"; -import { getConfig } from "../../../../utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { WalletType } from "../../../../shared/schemas/wallet"; +import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/contract/events/getAllEvents.ts b/src/server/routes/contract/events/getAllEvents.ts index a28264b45..5d6150779 100644 --- a/src/server/routes/contract/events/getAllEvents.ts +++ b/src/server/routes/contract/events/getAllEvents.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { contractEventSchema, eventsQuerystringSchema, diff --git a/src/server/routes/contract/events/getContractEventLogs.ts b/src/server/routes/contract/events/getContractEventLogs.ts index 85e0a0c3c..47a12a269 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 "../../../../db/contractEventLogs/getContractEventLogs"; -import { isContractSubscribed } from "../../../../db/contractSubscriptions/getContractSubscriptions"; +import { getContractEventLogsByBlockAndTopics } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; +import { isContractSubscribed } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; 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 2cde46d21..267ab1eb8 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 "../../../../db/contractEventLogs/getContractEventLogs"; +import { getEventLogsByBlockTimestamp } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; import { AddressSchema } from "../../../schemas/address"; import { eventLogSchema } from "../../../schemas/eventLog"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/contract/events/getEvents.ts b/src/server/routes/contract/events/getEvents.ts index f30839eba..69cabe01c 100644 --- a/src/server/routes/contract/events/getEvents.ts +++ b/src/server/routes/contract/events/getEvents.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { contractEventSchema, eventsQuerystringSchema, diff --git a/src/server/routes/contract/events/paginateEventLogs.ts b/src/server/routes/contract/events/paginateEventLogs.ts index 02a4c5212..1767a4c07 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 "../../../../db/configuration/getConfiguration"; -import { getEventLogsByCursor } from "../../../../db/contractEventLogs/getContractEventLogs"; +import { getConfiguration } from "../../../../shared/db/configuration/getConfiguration"; +import { getEventLogsByCursor } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; 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/read/getAllAdmins.ts b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts index 13d5d38a2..ea6428780 100644 --- a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts +++ b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/account/read/getAllSessions.ts b/src/server/routes/contract/extensions/account/read/getAllSessions.ts index fd3bd971a..68db22c51 100644 --- a/src/server/routes/contract/extensions/account/read/getAllSessions.ts +++ b/src/server/routes/contract/extensions/account/read/getAllSessions.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/grantAdmin.ts b/src/server/routes/contract/extensions/account/write/grantAdmin.ts index 6d5b11e82..2a7120ca8 100644 --- a/src/server/routes/contract/extensions/account/write/grantAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/grantAdmin.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/grantSession.ts b/src/server/routes/contract/extensions/account/write/grantSession.ts index 0e64558d7..ab04cfcfa 100644 --- a/src/server/routes/contract/extensions/account/write/grantSession.ts +++ b/src/server/routes/contract/extensions/account/write/grantSession.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts index 2e21671aa..2b19ee104 100644 --- a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/revokeSession.ts b/src/server/routes/contract/extensions/account/write/revokeSession.ts index f71e40218..58c74d8c7 100644 --- a/src/server/routes/contract/extensions/account/write/revokeSession.ts +++ b/src/server/routes/contract/extensions/account/write/revokeSession.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/updateSession.ts b/src/server/routes/contract/extensions/account/write/updateSession.ts index 46da67695..daade19b1 100644 --- a/src/server/routes/contract/extensions/account/write/updateSession.ts +++ b/src/server/routes/contract/extensions/account/write/updateSession.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts index 5a5208679..7fd003c0d 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts index 66f1ad35a..d3a9020cd 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts index 0ccbbde66..bce8ff614 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts b/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts index e4f0089aa..e540a46f0 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { predictAddress } from "thirdweb/wallets/smart"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts b/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts index 55f2c34d6..1eb2a60b4 100644 --- a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts +++ b/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { createAccount as factoryCreateAccount } from "thirdweb/extensions/erc4337"; import { isHex, stringToHex } from "thirdweb/utils"; import { predictAddress } from "thirdweb/wallets/smart"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { redis } from "../../../../../../utils/redis/redis"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { redis } from "../../../../../../shared/utils/redis/redis"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { prebuiltDeployResponseSchema } from "../../../../../schemas/prebuilts"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts index 635da28ae..2cfa5c07a 100644 --- a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts index 5b100dd11..c5bcba524 100644 --- a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/get.ts b/src/server/routes/contract/extensions/erc1155/read/get.ts index c9edfafca..acb439591 100644 --- a/src/server/routes/contract/extensions/erc1155/read/get.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts index 62f7807b4..739707d3c 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getAll.ts b/src/server/routes/contract/extensions/erc1155/read/getAll.ts index 8d1018a5b..42b563c1f 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc1155/read/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 { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts index 5bc021d5d..9003f2db4 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts index d50a6af03..8b061be03 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts index 59a130fb0..05e53b95e 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts index e56383bd0..d4a8f08dc 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts index f97a3089a..ac1fac7dd 100644 --- a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts index 85e8b8d7b..ab95c40e3 100644 --- a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts @@ -4,11 +4,11 @@ import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import type { NFTInput } from "thirdweb/dist/types/utils/nft/parseNft"; import { generateMintSignature } from "thirdweb/extensions/erc1155"; -import { getAccount } from "../../../../../../utils/account"; -import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; -import { getChain } from "../../../../../../utils/chain"; -import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; +import { getAccount } from "../../../../../../shared/utils/account"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts index ca225d4e9..21b24ad92 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts index 54de23b04..e1dafd5cf 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts index d8e60a5ec..5164f0a83 100644 --- a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts +++ b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burn.ts b/src/server/routes/contract/extensions/erc1155/write/burn.ts index 7c1a126df..d01ea058d 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burn.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts index d4dedc504..a78cb430c 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts index 39bd1e4a4..c716b1f61 100644 --- a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts @@ -1,10 +1,10 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc1155"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; 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 015284d09..b31c48bf1 100644 --- a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts index f48e90bea..58fa670ab 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts index 1d31b92aa..e8776756a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts index 4fe92d9be..20e1b01a6 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { mintTo } from "thirdweb/extensions/erc1155"; import type { NFTInput } from "thirdweb/utils"; -import { getChain } from "../../../../../../utils/chain"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts index db5a05f60..510469914 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts index 702c5ae4e..36e81475b 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type setBatchSantiziedClaimConditionsRequestSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts index cf014efaf..6f3021397 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts index adc3ed3e8..b1e12fb4b 100644 --- a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts @@ -3,8 +3,8 @@ 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 "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { signature1155OutputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/transfer.ts b/src/server/routes/contract/extensions/erc1155/write/transfer.ts index 4db2395ec..61d46227a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Hex } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema, HexSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts index 385857075..66229cc15 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Hex } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema, HexSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts index 21bb87a40..ce3e63e10 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts index 3c020ff24..0689517fa 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts index 128fd9f86..8386bc054 100644 --- a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts index edade3a9f..167ec4cf4 100644 --- a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/canClaim.ts b/src/server/routes/contract/extensions/erc20/read/canClaim.ts index b38495b17..078c8d7f2 100644 --- a/src/server/routes/contract/extensions/erc20/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc20/read/canClaim.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/get.ts b/src/server/routes/contract/extensions/erc20/read/get.ts index c89338d37..88f532f0b 100644 --- a/src/server/routes/contract/extensions/erc20/read/get.ts +++ b/src/server/routes/contract/extensions/erc20/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts index 8013f7cff..15a992342 100644 --- a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts index 578466a13..841ebcda3 100644 --- a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts index 832ce01ef..19b7a12de 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts index ad7659b05..0778a85ac 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts index 341aabf9d..ae6ccff36 100644 --- a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc20"; -import { getAccount } from "../../../../../../utils/account"; -import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; -import { getChain } from "../../../../../../utils/chain"; -import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; +import { getAccount } from "../../../../../../shared/utils/account"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { signature20InputSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts index fd3399e97..06ee4548b 100644 --- a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burn.ts b/src/server/routes/contract/extensions/erc20/write/burn.ts index 54ad7e7ce..7c9f093f7 100644 --- a/src/server/routes/contract/extensions/erc20/write/burn.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts index 956d9f9b3..ad5498414 100644 --- a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/claimTo.ts b/src/server/routes/contract/extensions/erc20/write/claimTo.ts index fd5a70ffd..db7678729 100644 --- a/src/server/routes/contract/extensions/erc20/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/claimTo.ts @@ -1,10 +1,10 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc20"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { erc20ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts index 2fd89eb9c..dd3e4b601 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/mintTo.ts b/src/server/routes/contract/extensions/erc20/write/mintTo.ts index 32d54e502..ea2b170e4 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintTo.ts @@ -3,9 +3,9 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { mintTo } from "thirdweb/extensions/erc20"; -import { getChain } from "../../../../../../utils/chain"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts index 80fd18b02..7cad12a44 100644 --- a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts +++ b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts index 57ce2c8c8..cc6ced02c 100644 --- a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts index 38fd423ff..182259b9b 100644 --- a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts @@ -3,8 +3,8 @@ 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 "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { signature20OutputSchema } from "../../../../../schemas/erc20"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/transfer.ts b/src/server/routes/contract/extensions/erc20/write/transfer.ts index 512903a44..75a3c2d14 100644 --- a/src/server/routes/contract/extensions/erc20/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc20/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transfer } from "thirdweb/extensions/erc20"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { TokenAmountStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts index ce9ed134c..ec1c46403 100644 --- a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc20"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { TokenAmountStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts index 99cd79b48..96ec7578d 100644 --- a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts index 72b9e2aef..1bad0235d 100644 --- a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc721ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/canClaim.ts b/src/server/routes/contract/extensions/erc721/read/canClaim.ts index d80226ccd..6aa53c54d 100644 --- a/src/server/routes/contract/extensions/erc721/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc721/read/canClaim.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/get.ts b/src/server/routes/contract/extensions/erc721/read/get.ts index 11faf6bdc..e5f332ab2 100644 --- a/src/server/routes/contract/extensions/erc721/read/get.ts +++ b/src/server/routes/contract/extensions/erc721/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts index 88164318d..f24521b3d 100644 --- a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getAll.ts b/src/server/routes/contract/extensions/erc721/read/getAll.ts index 043db6f74..4eb8bacab 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc721/read/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 { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts index 9158456f5..8d4a62f0e 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts index c4b069987..88d552910 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts index eee8854cd..d39672dac 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/getOwned.ts b/src/server/routes/contract/extensions/erc721/read/getOwned.ts index 847d69c36..311ef318c 100644 --- a/src/server/routes/contract/extensions/erc721/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc721/read/getOwned.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/isApproved.ts b/src/server/routes/contract/extensions/erc721/read/isApproved.ts index b8ecc6e8a..22d3cbecd 100644 --- a/src/server/routes/contract/extensions/erc721/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc721/read/isApproved.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts index 0fca0a1f2..281399a7e 100644 --- a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc721"; -import { getAccount } from "../../../../../../utils/account"; -import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; -import { getChain } from "../../../../../../utils/chain"; -import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; +import { getAccount } from "../../../../../../shared/utils/account"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { signature721InputSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts index 0636354a2..5cb0d632f 100644 --- a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts +++ b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts @@ -17,9 +17,9 @@ import { import { decimals } from "thirdweb/extensions/erc20"; import { upload } from "thirdweb/storage"; import { checksumAddress } from "thirdweb/utils"; -import { getChain } from "../../../../../../utils/chain"; -import { prettifyError } from "../../../../../../utils/error"; -import { thirdwebClient } from "../../../../../../utils/sdk"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { prettifyError } from "../../../../../../shared/utils/error"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { signature721InputSchemaV5, diff --git a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts index 94d6d91bb..342f63448 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/totalCount.ts b/src/server/routes/contract/extensions/erc721/read/totalCount.ts index 7599028de..5a6cd5809 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts index 5eb39d2c7..88c4b12f8 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/burn.ts b/src/server/routes/contract/extensions/erc721/write/burn.ts index f0591eafa..259ba1af1 100644 --- a/src/server/routes/contract/extensions/erc721/write/burn.ts +++ b/src/server/routes/contract/extensions/erc721/write/burn.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/claimTo.ts b/src/server/routes/contract/extensions/erc721/write/claimTo.ts index a18780e08..1366bb9cb 100644 --- a/src/server/routes/contract/extensions/erc721/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/claimTo.ts @@ -1,10 +1,10 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc721"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; 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 c553454f8..7f22c2eae 100644 --- a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts index 79c14a801..38e5aa299 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mintTo.ts index 0a8f108da..7a70f011f 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintTo.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { mintTo } from "thirdweb/extensions/erc721"; import type { NFTInput } from "thirdweb/utils"; -import { getChain } from "../../../../../../utils/chain"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts index b521adf4d..3f3c29c8f 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts index 8b3f8e7b3..ad7fd5aa8 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts index 8e67bdaae..42afb844d 100644 --- a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts @@ -1,11 +1,11 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, - sanitizedClaimConditionInputSchema, + type sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts index 2a85bb169..808c14246 100644 --- a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts @@ -1,16 +1,16 @@ -import { Static, Type } from "@sinclair/typebox"; -import { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk"; +import { type Static, Type } from "@sinclair/typebox"; +import type { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address, Hex } from "thirdweb"; +import type { Address, Hex } from "thirdweb"; import { mintWithSignature } from "thirdweb/extensions/erc721"; import { resolvePromisedValue } from "thirdweb/utils"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; -import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; -import { insertTransaction } from "../../../../../../utils/transaction/insertTransaction"; -import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { insertTransaction } from "../../../../../../shared/utils/transaction/insertTransaction"; +import type { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { signature721OutputSchema } from "../../../../../schemas/nft"; import { signature721OutputSchemaV5 } from "../../../../../schemas/nft/v5"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/transfer.ts b/src/server/routes/contract/extensions/erc721/write/transfer.ts index 60f00d5bb..87835ca09 100644 --- a/src/server/routes/contract/extensions/erc721/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc721/write/transfer.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts index 404086221..e19e8cb9d 100644 --- a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; -import { getChain } from "../../../../../../utils/chain"; -import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../../../../utils/sdk"; -import { queueTransaction } from "../../../../../../utils/transaction/queueTransation"; +import { getChain } from "../../../../../../shared/utils/chain"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../../../../shared/utils/sdk"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts index 8b8faaa49..d9c9fb6f7 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts @@ -1,11 +1,11 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, - sanitizedClaimConditionInputSchema, + type sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts index 48ba8e64f..c8a610821 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts index 500b976c6..5debad7eb 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/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 { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts index 6b3182668..a7e35ab5d 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts index 73397c27f..cd7b396bd 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts index 1d6228f9c..c46910f28 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts index 05ff2336a..4b261a5a3 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts index 02b353a97..3351dd6d7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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 c9b697a25..f723caadc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 75ff756b8..37ab99780 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 17222f50a..af6a96951 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 74c7f63d8..141feddad 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, 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 79cd57d3d..607afb958 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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 048a81b78..705463bf4 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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 63db76bd4..c58104607 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts index 674368c5b..f7ebc52d2 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/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 { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts index d99b58077..25a65fcc1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts index 0b0ffc488..53353271c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts index 81193e015..de9247202 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts index f17418ec2..c02d495e9 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { currencyValueSchema, marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts index e44013962..4813b190c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts index 6781ca0d1..95d4e19ed 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts index 9c117f18c..6f839ff0c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { bidSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts index 08c3b6e20..a70f469a6 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, 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 64a931d47..142d5a6f3 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 df6f44c71..dbcd85bec 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 1b5236a93..f0131cb06 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 32ad9f01a..0485e4151 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 b348b1b1d..f74f0ad23 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts @@ -1,8 +1,8 @@ import type { Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionInputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, 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 19e591eeb..9770164ef 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 7545db42e..8eabd7456 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts index 6497ed6d5..e4b9271c7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/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 { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts index e913d2911..01c1b6bcd 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts index 4eb1991cb..d752431fc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts index 86f476220..ada1fb3e6 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, 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 f1614a731..7eed54d24 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 aa205c3ac..0f81e3138 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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 3cc4deb43..daa44c8c1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3InputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index 56cbb5b10..f642809bf 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { abiSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/metadata/events.ts b/src/server/routes/contract/metadata/events.ts index 0d3e769fa..f16d65e2f 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { abiEventSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/metadata/extensions.ts b/src/server/routes/contract/metadata/extensions.ts index 79255c7f8..d4d553173 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { getAllDetectedExtensionNames } from "@thirdweb-dev/sdk"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/metadata/functions.ts b/src/server/routes/contract/metadata/functions.ts index 268254418..3d45736ba 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/getContract"; import { abiFunctionSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/read/read.ts b/src/server/routes/contract/read/read.ts index 89b0e115d..81721a098 100644 --- a/src/server/routes/contract/read/read.ts +++ b/src/server/routes/contract/read/read.ts @@ -1,8 +1,8 @@ import { Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../utils/cache/getContract"; -import { prettifyError } from "../../../../utils/error"; +import { getContract } from "../../../../shared/utils/cache/getContract"; +import { prettifyError } from "../../../../shared/utils/error"; import { createCustomError } from "../../../middleware/error"; import { readRequestQuerySchema, diff --git a/src/server/routes/contract/roles/read/get.ts b/src/server/routes/contract/roles/read/get.ts index a10b1e827..f07c1479f 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/roles/read/getAll.ts b/src/server/routes/contract/roles/read/getAll.ts index 175b626df..ee4a8d920 100644 --- a/src/server/routes/contract/roles/read/getAll.ts +++ b/src/server/routes/contract/roles/read/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 { getContract } from "../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { rolesResponseSchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/roles/write/grant.ts b/src/server/routes/contract/roles/write/grant.ts index c82ad2269..538b2d869 100644 --- a/src/server/routes/contract/roles/write/grant.ts +++ b/src/server/routes/contract/roles/write/grant.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/roles/write/revoke.ts b/src/server/routes/contract/roles/write/revoke.ts index 4b1173132..063f9c8e1 100644 --- a/src/server/routes/contract/roles/write/revoke.ts +++ b/src/server/routes/contract/roles/write/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 { queueTx } from "../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts index c6282d135..ed85d8712 100644 --- a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts index fec257ad5..163ae5fee 100644 --- a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts index acfb5c8fd..239c08778 100644 --- a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts index 4d12d72b0..6ff5d09c2 100644 --- a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../db/transactions/queueTx"; -import { getContract } from "../../../../../utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/addContractSubscription.ts index bddd24fc1..05637d75f 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/addContractSubscription.ts @@ -1,16 +1,16 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { isContractDeployed } from "thirdweb/utils"; -import { upsertChainIndexer } from "../../../../db/chainIndexers/upsertChainIndexer"; -import { createContractSubscription } from "../../../../db/contractSubscriptions/createContractSubscription"; -import { getContractSubscriptionsUniqueChainIds } from "../../../../db/contractSubscriptions/getContractSubscriptions"; -import { insertWebhook } from "../../../../db/webhooks/createWebhook"; -import { WebhooksEventTypes } from "../../../../schema/webhooks"; -import { getSdk } from "../../../../utils/cache/getSdk"; -import { getChain } from "../../../../utils/chain"; -import { thirdwebClient } from "../../../../utils/sdk"; +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 { WebhooksEventTypes } from "../../../../shared/schemas/webhooks"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { getChain } from "../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts index e708cd8b2..66a5f0cb8 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 "../../../../db/contractEventLogs/getContractEventLogs"; +import { getContractEventLogsIndexedBlockRange } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; 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 81fb1ac2d..d542ee9a2 100644 --- a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts +++ b/src/server/routes/contract/subscriptions/getContractSubscriptions.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getAllContractSubscriptions } from "../../../../db/contractSubscriptions/getContractSubscriptions"; +import { getAllContractSubscriptions } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; import { contractSubscriptionSchema, toContractSubscriptionSchema, diff --git a/src/server/routes/contract/subscriptions/getLatestBlock.ts b/src/server/routes/contract/subscriptions/getLatestBlock.ts index 49f81e09c..1cea5a453 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 "../../../../db/chainIndexers/getChainIndexer"; +import { getLastIndexedBlock } from "../../../../shared/db/chainIndexers/getChainIndexer"; 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 3b0711c75..488b2d68c 100644 --- a/src/server/routes/contract/subscriptions/removeContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/removeContractSubscription.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { deleteContractSubscription } from "../../../../db/contractSubscriptions/deleteContractSubscription"; -import { deleteWebhook } from "../../../../db/webhooks/revokeWebhook"; +import { deleteContractSubscription } from "../../../../shared/db/contractSubscriptions/deleteContractSubscription"; +import { deleteWebhook } from "../../../../shared/db/webhooks/revokeWebhook"; 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 87b90a530..d0267226d 100644 --- a/src/server/routes/contract/transactions/getTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/getTransactionReceipts.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { isContractSubscribed } from "../../../../db/contractSubscriptions/getContractSubscriptions"; -import { getContractTransactionReceiptsByBlock } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; +import { isContractSubscribed } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getContractTransactionReceiptsByBlock } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; 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 2c76ec6da..5a9f55393 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 "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; +import { getTransactionReceiptsByBlockTimestamp } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; 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 0d13b9b1d..6aca2a842 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 "../../../../db/configuration/getConfiguration"; -import { getTransactionReceiptsByCursor } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; +import { getConfiguration } from "../../../../shared/db/configuration/getConfiguration"; +import { getTransactionReceiptsByCursor } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/contract/write/write.ts b/src/server/routes/contract/write/write.ts index b47049786..3f928832f 100644 --- a/src/server/routes/contract/write/write.ts +++ b/src/server/routes/contract/write/write.ts @@ -3,9 +3,9 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prepareContractCall, resolveMethod } from "thirdweb"; import { parseAbiParams, type AbiFunction } from "thirdweb/utils"; -import { getContractV5 } from "../../../../utils/cache/getContractv5"; -import { prettifyError } from "../../../../utils/error"; -import { queueTransaction } from "../../../../utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../shared/utils/cache/getContractv5"; +import { prettifyError } from "../../../../shared/utils/error"; +import { queueTransaction } from "../../../../shared/utils/transaction/queueTransation"; import { createCustomError } from "../../../middleware/error"; import { abiArraySchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilt.ts b/src/server/routes/deploy/prebuilt.ts index 38815a755..271d298b7 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../db/transactions/queueTx"; -import { getSdk } from "../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../shared/utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/edition.ts b/src/server/routes/deploy/prebuilts/edition.ts index 15b99b65b..611437a7b 100644 --- a/src/server/routes/deploy/prebuilts/edition.ts +++ b/src/server/routes/deploy/prebuilts/edition.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/editionDrop.ts b/src/server/routes/deploy/prebuilts/editionDrop.ts index 9e2c11bbd..8ffa11299 100644 --- a/src/server/routes/deploy/prebuilts/editionDrop.ts +++ b/src/server/routes/deploy/prebuilts/editionDrop.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/marketplaceV3.ts b/src/server/routes/deploy/prebuilts/marketplaceV3.ts index 8635946c9..8d70769a9 100644 --- a/src/server/routes/deploy/prebuilts/marketplaceV3.ts +++ b/src/server/routes/deploy/prebuilts/marketplaceV3.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/multiwrap.ts b/src/server/routes/deploy/prebuilts/multiwrap.ts index 95df0dd8a..beb778bda 100644 --- a/src/server/routes/deploy/prebuilts/multiwrap.ts +++ b/src/server/routes/deploy/prebuilts/multiwrap.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/nftCollection.ts b/src/server/routes/deploy/prebuilts/nftCollection.ts index 002f6e629..d12c2ec63 100644 --- a/src/server/routes/deploy/prebuilts/nftCollection.ts +++ b/src/server/routes/deploy/prebuilts/nftCollection.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/nftDrop.ts b/src/server/routes/deploy/prebuilts/nftDrop.ts index 740df4fe8..19ca2a2f2 100644 --- a/src/server/routes/deploy/prebuilts/nftDrop.ts +++ b/src/server/routes/deploy/prebuilts/nftDrop.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/pack.ts b/src/server/routes/deploy/prebuilts/pack.ts index 1c7c0e44f..9e5eedbec 100644 --- a/src/server/routes/deploy/prebuilts/pack.ts +++ b/src/server/routes/deploy/prebuilts/pack.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/signatureDrop.ts b/src/server/routes/deploy/prebuilts/signatureDrop.ts index f5f54d385..f7a4a6290 100644 --- a/src/server/routes/deploy/prebuilts/signatureDrop.ts +++ b/src/server/routes/deploy/prebuilts/signatureDrop.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/split.ts b/src/server/routes/deploy/prebuilts/split.ts index 8b9435a3e..8184c0699 100644 --- a/src/server/routes/deploy/prebuilts/split.ts +++ b/src/server/routes/deploy/prebuilts/split.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/token.ts b/src/server/routes/deploy/prebuilts/token.ts index 13980f951..50fde94fb 100644 --- a/src/server/routes/deploy/prebuilts/token.ts +++ b/src/server/routes/deploy/prebuilts/token.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/tokenDrop.ts b/src/server/routes/deploy/prebuilts/tokenDrop.ts index 6129ecfa7..73f55b682 100644 --- a/src/server/routes/deploy/prebuilts/tokenDrop.ts +++ b/src/server/routes/deploy/prebuilts/tokenDrop.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/vote.ts b/src/server/routes/deploy/prebuilts/vote.ts index 2073993cd..fce36471f 100644 --- a/src/server/routes/deploy/prebuilts/vote.ts +++ b/src/server/routes/deploy/prebuilts/vote.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; -import { queueTx } from "../../../../db/transactions/queueTx"; -import { getSdk } from "../../../../utils/cache/getSdk"; +import type { Address } from "thirdweb"; +import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/published.ts b/src/server/routes/deploy/published.ts index 96fd698bb..13a313541 100644 --- a/src/server/routes/deploy/published.ts +++ b/src/server/routes/deploy/published.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +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 "../../../db/transactions/queueTx"; -import { getSdk } from "../../../utils/cache/getSdk"; +import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { publishedDeployParamSchema, diff --git a/src/server/routes/relayer/create.ts b/src/server/routes/relayer/create.ts index 1cda9f9b1..f7b34d05f 100644 --- a/src/server/routes/relayer/create.ts +++ b/src/server/routes/relayer/create.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { prisma } from "../../../db/client"; +import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; import { chainIdOrSlugSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/relayer/getAll.ts b/src/server/routes/relayer/getAll.ts index 55fba56d8..3798b5e67 100644 --- a/src/server/routes/relayer/getAll.ts +++ b/src/server/routes/relayer/getAll.ts @@ -1,7 +1,7 @@ import { Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { prisma } from "../../../db/client"; +import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index 866f18ac8..604a0774d 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -8,10 +8,10 @@ import { ForwarderAbi, ForwarderAbiEIP712ChainlessDomain, NativeMetaTransaction, -} from "../../../constants/relayer"; -import { getRelayerById } from "../../../db/relayer/getRelayerById"; -import { queueTx } from "../../../db/transactions/queueTx"; -import { getSdk } from "../../../utils/cache/getSdk"; +} from "../../../shared/schemas/relayer"; +import { getRelayerById } from "../../../shared/db/relayer/getRelayerById"; +import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { getSdk } from "../../../shared/utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema, diff --git a/src/server/routes/relayer/revoke.ts b/src/server/routes/relayer/revoke.ts index c69b8515d..aa84eb1ad 100644 --- a/src/server/routes/relayer/revoke.ts +++ b/src/server/routes/relayer/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 { prisma } from "../../../db/client"; +import { prisma } from "../../../shared/db/client"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/relayer/update.ts b/src/server/routes/relayer/update.ts index aca004e0f..421ac46af 100644 --- a/src/server/routes/relayer/update.ts +++ b/src/server/routes/relayer/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 { prisma } from "../../../db/client"; +import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; import { chainIdOrSlugSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/system/health.ts b/src/server/routes/system/health.ts index 2106aecae..23672c92f 100644 --- a/src/server/routes/system/health.ts +++ b/src/server/routes/system/health.ts @@ -1,10 +1,10 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { isDatabaseReachable } from "../../../db/client"; -import { env } from "../../../utils/env"; -import { isRedisReachable } from "../../../utils/redis/redis"; -import { thirdwebClientId } from "../../../utils/sdk"; +import { isDatabaseReachable } from "../../../shared/db/client"; +import { env } from "../../../shared/utils/env"; +import { isRedisReachable } from "../../../shared/utils/redis/redis"; +import { thirdwebClientId } from "../../../shared/utils/sdk"; import { createCustomError } from "../../middleware/error"; type EngineFeature = diff --git a/src/server/routes/system/queue.ts b/src/server/routes/system/queue.ts index 92763139e..8c01d2302 100644 --- a/src/server/routes/system/queue.ts +++ b/src/server/routes/system/queue.ts @@ -1,9 +1,9 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getPercentile } from "../../../utils/math"; -import type { MinedTransaction } from "../../../utils/transaction/types"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getPercentile } from "../../../shared/utils/math"; +import type { MinedTransaction } from "../../../shared/utils/transaction/types"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/blockchain/getLogs.ts b/src/server/routes/transaction/blockchain/getLogs.ts index 26a185dab..099dc246d 100644 --- a/src/server/routes/transaction/blockchain/getLogs.ts +++ b/src/server/routes/transaction/blockchain/getLogs.ts @@ -12,10 +12,10 @@ import { type Hex, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import { TransactionReceipt } from "thirdweb/transaction"; -import { TransactionDB } from "../../../../db/transactions/db"; -import { getChain } from "../../../../utils/chain"; -import { thirdwebClient } from "../../../../utils/sdk"; +import type { TransactionReceipt } from "thirdweb/transaction"; +import { TransactionDB } from "../../../../shared/db/transactions/db"; +import { getChain } from "../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/getReceipt.ts b/src/server/routes/transaction/blockchain/getReceipt.ts index 13cfd7786..b5d3c4378 100644 --- a/src/server/routes/transaction/blockchain/getReceipt.ts +++ b/src/server/routes/transaction/blockchain/getReceipt.ts @@ -9,12 +9,12 @@ import { } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { TransactionReceipt } from "viem"; -import { getChain } from "../../../../utils/chain"; +import { getChain } from "../../../../shared/utils/chain"; import { fromTransactionStatus, fromTransactionType, thirdwebClient, -} from "../../../../utils/sdk"; +} from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts index 76c8c43a0..220add1ae 100644 --- a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts +++ b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../../../utils/env"; +import { env } from "../../../../shared/utils/env"; import { createCustomError } from "../../../middleware/error"; import { TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/transaction/blockchain/sendSignedTx.ts b/src/server/routes/transaction/blockchain/sendSignedTx.ts index 5fc53a188..fe7e1ac83 100644 --- a/src/server/routes/transaction/blockchain/sendSignedTx.ts +++ b/src/server/routes/transaction/blockchain/sendSignedTx.ts @@ -2,8 +2,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_sendRawTransaction, getRpcClient, isHex } from "thirdweb"; -import { getChain } from "../../../../utils/chain"; -import { thirdwebClient } from "../../../../utils/sdk"; +import { getChain } from "../../../../shared/utils/chain"; +import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { TransactionHashSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts index f5b3b28a6..8db91f8e3 100644 --- a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts +++ b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts @@ -2,8 +2,8 @@ import { Type, type Static } from "@sinclair/typebox"; import { Value } from "@sinclair/typebox/value"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { env } from "../../../../utils/env"; -import { thirdwebClientId } from "../../../../utils/sdk"; +import { env } from "../../../../shared/utils/env"; +import { thirdwebClientId } from "../../../../shared/utils/sdk"; import { TransactionHashSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index d9b704383..cb49beb59 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -1,15 +1,15 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getBlockNumberish } from "../../../utils/block"; -import { getConfig } from "../../../utils/cache/getConfig"; -import { getChain } from "../../../utils/chain"; -import { msSince } from "../../../utils/date"; -import { sendCancellationTransaction } from "../../../utils/transaction/cancelTransaction"; -import type { CancelledTransaction } from "../../../utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../../utils/transaction/webhook"; -import { reportUsage } from "../../../utils/usage"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getBlockNumberish } from "../../../shared/utils/block"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getChain } from "../../../shared/utils/chain"; +import { msSince } from "../../../shared/utils/date"; +import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancelTransaction"; +import type { CancelledTransaction } from "../../../shared/utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; +import { reportUsage } from "../../../shared/utils/usage"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; diff --git a/src/server/routes/transaction/getAll.ts b/src/server/routes/transaction/getAll.ts index 5b58f5b3e..6243e0fc7 100644 --- a/src/server/routes/transaction/getAll.ts +++ b/src/server/routes/transaction/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 { TransactionDB } from "../../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { PaginationSchema } from "../../schemas/pagination"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/transaction/getAllDeployedContracts.ts b/src/server/routes/transaction/getAllDeployedContracts.ts index 4bcd88a61..d4745f9ad 100644 --- a/src/server/routes/transaction/getAllDeployedContracts.ts +++ b/src/server/routes/transaction/getAllDeployedContracts.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { TransactionSchema, diff --git a/src/server/routes/transaction/retry-failed.ts b/src/server/routes/transaction/retry-failed.ts index 5ac43c43b..1550a97ca 100644 --- a/src/server/routes/transaction/retry-failed.ts +++ b/src/server/routes/transaction/retry-failed.ts @@ -1,12 +1,12 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { getReceiptForEOATransaction, getReceiptForUserOp, -} from "../../../lib/transaction/get-transaction-receipt"; -import type { QueuedTransaction } from "../../../utils/transaction/types"; +} from "../../../shared/lib/transaction/get-transaction-receipt"; +import type { QueuedTransaction } from "../../../shared/utils/transaction/types"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/transaction/retry.ts b/src/server/routes/transaction/retry.ts index c8716e2dd..affd9a88c 100644 --- a/src/server/routes/transaction/retry.ts +++ b/src/server/routes/transaction/retry.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { maybeBigInt } from "../../../utils/primitiveTypes"; -import { SentTransaction } from "../../../utils/transaction/types"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { maybeBigInt } from "../../../shared/utils/primitiveTypes"; +import type { SentTransaction } from "../../../shared/utils/transaction/types"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/status.ts b/src/server/routes/transaction/status.ts index a5c9c1b95..616009cbf 100644 --- a/src/server/routes/transaction/status.ts +++ b/src/server/routes/transaction/status.ts @@ -1,9 +1,9 @@ -import { SocketStream } from "@fastify/websocket"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import type { SocketStream } from "@fastify/websocket"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { TransactionDB } from "../../../db/transactions/db"; -import { logger } from "../../../utils/logger"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { logger } from "../../../shared/utils/logger"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/transaction/sync-retry.ts b/src/server/routes/transaction/sync-retry.ts index 3eabdbd1e..e6ef887c4 100644 --- a/src/server/routes/transaction/sync-retry.ts +++ b/src/server/routes/transaction/sync-retry.ts @@ -2,15 +2,18 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { toSerializableTransaction } from "thirdweb"; -import { TransactionDB } from "../../../db/transactions/db"; -import { getReceiptForEOATransaction } from "../../../lib/transaction/get-transaction-receipt"; -import { getAccount } from "../../../utils/account"; -import { getBlockNumberish } from "../../../utils/block"; -import { getChain } from "../../../utils/chain"; -import { getChecksumAddress, maybeBigInt } from "../../../utils/primitiveTypes"; -import { thirdwebClient } from "../../../utils/sdk"; -import type { SentTransaction } from "../../../utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../../utils/transaction/webhook"; +import { TransactionDB } from "../../../shared/db/transactions/db"; +import { getReceiptForEOATransaction } from "../../../shared/lib/transaction/get-transaction-receipt"; +import { getAccount } from "../../../shared/utils/account"; +import { getBlockNumberish } from "../../../shared/utils/block"; +import { getChain } from "../../../shared/utils/chain"; +import { + getChecksumAddress, + maybeBigInt, +} from "../../../shared/utils/primitiveTypes"; +import { thirdwebClient } from "../../../shared/utils/sdk"; +import type { SentTransaction } from "../../../shared/utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; diff --git a/src/server/routes/webhooks/create.ts b/src/server/routes/webhooks/create.ts index a1cc44b32..b9e71f2a9 100644 --- a/src/server/routes/webhooks/create.ts +++ b/src/server/routes/webhooks/create.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { insertWebhook } from "../../../db/webhooks/createWebhook"; -import { WebhooksEventTypes } from "../../../schema/webhooks"; +import { insertWebhook } from "../../../shared/db/webhooks/createWebhook"; +import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { WebhookSchema, toWebhookSchema } from "../../schemas/webhook"; diff --git a/src/server/routes/webhooks/events.ts b/src/server/routes/webhooks/events.ts index 1e621e771..35f636d0b 100644 --- a/src/server/routes/webhooks/events.ts +++ b/src/server/routes/webhooks/events.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { WebhooksEventTypes } from "../../../schema/webhooks"; +import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/webhooks/getAll.ts b/src/server/routes/webhooks/getAll.ts index 9e22617f4..1c3c26149 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 "../../../db/webhooks/getAllWebhooks"; +import { getAllWebhooks } from "../../../shared/db/webhooks/getAllWebhooks"; 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 d6725c6ba..e3b220442 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 "../../../db/webhooks/getWebhook"; -import { deleteWebhook } from "../../../db/webhooks/revokeWebhook"; +import { getWebhook } from "../../../shared/db/webhooks/getWebhook"; +import { deleteWebhook } from "../../../shared/db/webhooks/revokeWebhook"; 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 68bc341c6..c70bbb5de 100644 --- a/src/server/routes/webhooks/test.ts +++ b/src/server/routes/webhooks/test.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 "../../../db/webhooks/getWebhook"; -import { sendWebhookRequest } from "../../../utils/webhook"; +import { getWebhook } from "../../../shared/db/webhooks/getWebhook"; +import { sendWebhookRequest } from "../../../shared/utils/webhook"; import { createCustomError } from "../../middleware/error"; import { NumberStringSchema } from "../../schemas/number"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/schemas/transaction/index.ts b/src/server/schemas/transaction/index.ts index c9dd5500c..c2ddb8825 100644 --- a/src/server/schemas/transaction/index.ts +++ b/src/server/schemas/transaction/index.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { Hex } from "thirdweb"; import { stringify } from "thirdweb/utils"; -import type { AnyTransaction } from "../../../utils/transaction/types"; +import type { AnyTransaction } from "../../../shared/utils/transaction/types"; import { AddressSchema, TransactionHashSchema } from "../address"; export const TransactionSchema = Type.Object({ diff --git a/src/server/schemas/wallet/index.ts b/src/server/schemas/wallet/index.ts index c4119fa61..3f4d940f4 100644 --- a/src/server/schemas/wallet/index.ts +++ b/src/server/schemas/wallet/index.ts @@ -1,6 +1,6 @@ import { Type } from "@sinclair/typebox"; import { getAddress, type Address } from "thirdweb"; -import { env } from "../../../utils/env"; +import { env } from "../../../shared/utils/env"; import { badAddressError } from "../../middleware/error"; import { AddressSchema } from "../address"; import { chainIdOrSlugSchema } from "../chain"; diff --git a/src/server/utils/chain.ts b/src/server/utils/chain.ts index 5ea5741d6..b0e5c7d7b 100644 --- a/src/server/utils/chain.ts +++ b/src/server/utils/chain.ts @@ -1,5 +1,5 @@ import { getChainBySlugAsync } from "@thirdweb-dev/chains"; -import { getChain } from "../../utils/chain"; +import { getChain } from "../../shared/utils/chain"; import { badChainError } from "../middleware/error"; /** diff --git a/src/server/utils/storage/localStorage.ts b/src/server/utils/storage/localStorage.ts index 8c5557faa..95665f675 100644 --- a/src/server/utils/storage/localStorage.ts +++ b/src/server/utils/storage/localStorage.ts @@ -1,8 +1,8 @@ import type { AsyncStorage } from "@thirdweb-dev/wallets"; import fs from "node:fs"; -import { prisma } from "../../../db/client"; -import { WalletType } from "../../../schema/wallet"; -import { logger } from "../../../utils/logger"; +import { prisma } from "../../../shared/db/client"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { logger } from "../../../shared/utils/logger"; /** * @deprecated @@ -38,7 +38,7 @@ export class LocalFileStorage implements AsyncStorage { logger({ service: "server", level: "error", - message: `No local wallet found!`, + message: "No local wallet found!", }); return null; } diff --git a/src/server/utils/transactionOverrides.ts b/src/server/utils/transactionOverrides.ts index a048504ed..83f728024 100644 --- a/src/server/utils/transactionOverrides.ts +++ b/src/server/utils/transactionOverrides.ts @@ -1,6 +1,6 @@ import type { Static } from "@sinclair/typebox"; -import { maybeBigInt } from "../../utils/primitiveTypes"; -import type { InsertedTransaction } from "../../utils/transaction/types"; +import { maybeBigInt } from "../../shared/utils/primitiveTypes"; +import type { InsertedTransaction } from "../../shared/utils/transaction/types"; import type { txOverridesSchema, txOverridesWithValueSchema, diff --git a/src/server/utils/wallets/createGcpKmsWallet.ts b/src/server/utils/wallets/createGcpKmsWallet.ts index 2b4b47201..bf4a249a2 100644 --- a/src/server/utils/wallets/createGcpKmsWallet.ts +++ b/src/server/utils/wallets/createGcpKmsWallet.ts @@ -1,7 +1,7 @@ import { KeyManagementServiceClient } from "@google-cloud/kms"; -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { WalletType } from "../../../schema/wallet"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { FetchGcpKmsWalletParamsError, fetchGcpKmsWalletParams, diff --git a/src/server/utils/wallets/createLocalWallet.ts b/src/server/utils/wallets/createLocalWallet.ts index 03392c1a6..c8b187171 100644 --- a/src/server/utils/wallets/createLocalWallet.ts +++ b/src/server/utils/wallets/createLocalWallet.ts @@ -1,9 +1,9 @@ import { encryptKeystore } from "@ethersproject/json-wallets"; import { privateKeyToAccount } from "thirdweb/wallets"; import { generatePrivateKey } from "viem/accounts"; -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { env } from "../../../utils/env"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { env } from "../../../shared/utils/env"; +import { thirdwebClient } from "../../../shared/utils/sdk"; interface CreateLocalWallet { label?: string; diff --git a/src/server/utils/wallets/createSmartWallet.ts b/src/server/utils/wallets/createSmartWallet.ts index 5859a430a..263c60f03 100644 --- a/src/server/utils/wallets/createSmartWallet.ts +++ b/src/server/utils/wallets/createSmartWallet.ts @@ -1,8 +1,8 @@ import { defineChain, type Address, type Chain } from "thirdweb"; import { smartWallet, type Account } from "thirdweb/wallets"; -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { WalletType } from "../../../schema/wallet"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; import { createAwsKmsKey, diff --git a/src/server/utils/wallets/fetchAwsKmsWalletParams.ts b/src/server/utils/wallets/fetchAwsKmsWalletParams.ts index f94cd0f1f..eea36e9ca 100644 --- a/src/server/utils/wallets/fetchAwsKmsWalletParams.ts +++ b/src/server/utils/wallets/fetchAwsKmsWalletParams.ts @@ -1,4 +1,4 @@ -import { getConfig } from "../../../utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; export type AwsKmsWalletParams = { awsAccessKeyId: string; diff --git a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts b/src/server/utils/wallets/fetchGcpKmsWalletParams.ts index b0c468ebc..a5f6de90b 100644 --- a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts +++ b/src/server/utils/wallets/fetchGcpKmsWalletParams.ts @@ -1,4 +1,4 @@ -import { getConfig } from "../../../utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/getConfig"; export type GcpKmsWalletParams = { gcpApplicationCredentialEmail: string; diff --git a/src/server/utils/wallets/getAwsKmsAccount.ts b/src/server/utils/wallets/getAwsKmsAccount.ts index 91e99104d..33d828ec7 100644 --- a/src/server/utils/wallets/getAwsKmsAccount.ts +++ b/src/server/utils/wallets/getAwsKmsAccount.ts @@ -17,7 +17,7 @@ import type { TypedDataDefinition, } from "viem"; import { hashTypedData } from "viem"; -import { getChain } from "../../../utils/chain"; +import { getChain } from "../../../shared/utils/chain"; type SendTransactionResult = { transactionHash: Hex; diff --git a/src/server/utils/wallets/getGcpKmsAccount.ts b/src/server/utils/wallets/getGcpKmsAccount.ts index b73135331..cf02625a7 100644 --- a/src/server/utils/wallets/getGcpKmsAccount.ts +++ b/src/server/utils/wallets/getGcpKmsAccount.ts @@ -17,7 +17,7 @@ import type { TypedDataDefinition, } from "viem"; import { hashTypedData } from "viem"; -import { getChain } from "../../../utils/chain"; // Adjust import path as needed +import { getChain } from "../../../shared/utils/chain"; // Adjust import path as needed type SendTransactionResult = { transactionHash: Hex; diff --git a/src/server/utils/wallets/getLocalWallet.ts b/src/server/utils/wallets/getLocalWallet.ts index 0f4456423..dd078f4e4 100644 --- a/src/server/utils/wallets/getLocalWallet.ts +++ b/src/server/utils/wallets/getLocalWallet.ts @@ -3,11 +3,11 @@ import { Wallet } from "ethers"; import type { Address } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { privateKeyToAccount, type Account } from "thirdweb/wallets"; -import { getWalletDetails } from "../../../db/wallets/getWalletDetails"; -import { getChain } from "../../../utils/chain"; -import { env } from "../../../utils/env"; -import { logger } from "../../../utils/logger"; -import { thirdwebClient } from "../../../utils/sdk"; +import { getWalletDetails } from "../../../shared/db/wallets/getWalletDetails"; +import { getChain } from "../../../shared/utils/chain"; +import { env } from "../../../shared/utils/env"; +import { logger } from "../../../shared/utils/logger"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { badChainError } from "../../middleware/error"; import { LocalFileStorage } from "../storage/localStorage"; diff --git a/src/server/utils/wallets/getSmartWallet.ts b/src/server/utils/wallets/getSmartWallet.ts index 59ab4d885..67db9f1d1 100644 --- a/src/server/utils/wallets/getSmartWallet.ts +++ b/src/server/utils/wallets/getSmartWallet.ts @@ -1,7 +1,7 @@ import { SmartWallet, type EVMWallet } from "@thirdweb-dev/wallets"; -import { getContract } from "../../../utils/cache/getContract"; -import { env } from "../../../utils/env"; -import { redis } from "../../../utils/redis/redis"; +import { getContract } from "../../../shared/utils/cache/getContract"; +import { env } from "../../../shared/utils/env"; +import { redis } from "../../../shared/utils/redis/redis"; interface GetSmartWalletParams { chainId: number; diff --git a/src/server/utils/wallets/importAwsKmsWallet.ts b/src/server/utils/wallets/importAwsKmsWallet.ts index 159db1a69..82d3969b4 100644 --- a/src/server/utils/wallets/importAwsKmsWallet.ts +++ b/src/server/utils/wallets/importAwsKmsWallet.ts @@ -1,6 +1,6 @@ -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { WalletType } from "../../../schema/wallet"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; import { getAwsKmsAccount } from "./getAwsKmsAccount"; diff --git a/src/server/utils/wallets/importGcpKmsWallet.ts b/src/server/utils/wallets/importGcpKmsWallet.ts index 5ac149b55..d34d1f865 100644 --- a/src/server/utils/wallets/importGcpKmsWallet.ts +++ b/src/server/utils/wallets/importGcpKmsWallet.ts @@ -1,6 +1,6 @@ -import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; -import { WalletType } from "../../../schema/wallet"; -import { thirdwebClient } from "../../../utils/sdk"; +import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { WalletType } from "../../../shared/schemas/wallet"; +import { thirdwebClient } from "../../../shared/utils/sdk"; import { getGcpKmsAccount } from "./getGcpKmsAccount"; interface ImportGcpKmsWalletParams { diff --git a/src/server/utils/wallets/importLocalWallet.ts b/src/server/utils/wallets/importLocalWallet.ts index 3ad1c7a6e..a917c484f 100644 --- a/src/server/utils/wallets/importLocalWallet.ts +++ b/src/server/utils/wallets/importLocalWallet.ts @@ -1,5 +1,5 @@ import { LocalWallet } from "@thirdweb-dev/wallets"; -import { env } from "../../../utils/env"; +import { env } from "../../../shared/utils/env"; import { LocalFileStorage } from "../storage/localStorage"; type ImportLocalWalletParams = diff --git a/src/server/utils/websocket.ts b/src/server/utils/websocket.ts index 4e68a198d..b18f1dd13 100644 --- a/src/server/utils/websocket.ts +++ b/src/server/utils/websocket.ts @@ -1,9 +1,9 @@ -import { SocketStream } from "@fastify/websocket"; -import { Static } from "@sinclair/typebox"; -import { FastifyRequest } from "fastify"; -import { logger } from "../../utils/logger"; -import { TransactionSchema } from "../schemas/transaction"; -import { UserSubscription, subscriptionsData } from "../schemas/websocket"; +import type { SocketStream } from "@fastify/websocket"; +import type { Static } from "@sinclair/typebox"; +import type { FastifyRequest } from "fastify"; +import { logger } from "../../shared/utils/logger"; +import type { TransactionSchema } from "../schemas/transaction"; +import { type UserSubscription, subscriptionsData } from "../schemas/websocket"; // websocket timeout, i.e., ws connection closed after 10 seconds const timeoutDuration = 10 * 60 * 1000; diff --git a/src/db/chainIndexers/getChainIndexer.ts b/src/shared/db/chainIndexers/getChainIndexer.ts similarity index 94% rename from src/db/chainIndexers/getChainIndexer.ts rename to src/shared/db/chainIndexers/getChainIndexer.ts index 166c2f228..ae7f3e7e8 100644 --- a/src/db/chainIndexers/getChainIndexer.ts +++ b/src/shared/db/chainIndexers/getChainIndexer.ts @@ -1,5 +1,5 @@ import { Prisma } from "@prisma/client"; -import type { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetLastIndexedBlockParams { diff --git a/src/db/chainIndexers/upsertChainIndexer.ts b/src/shared/db/chainIndexers/upsertChainIndexer.ts similarity index 91% rename from src/db/chainIndexers/upsertChainIndexer.ts rename to src/shared/db/chainIndexers/upsertChainIndexer.ts index 123a2a464..744a12a81 100644 --- a/src/db/chainIndexers/upsertChainIndexer.ts +++ b/src/shared/db/chainIndexers/upsertChainIndexer.ts @@ -1,4 +1,4 @@ -import type { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface UpsertChainIndexerParams { diff --git a/src/db/client.ts b/src/shared/db/client.ts similarity index 84% rename from src/db/client.ts rename to src/shared/db/client.ts index bddb0eafe..9c57b1417 100644 --- a/src/db/client.ts +++ b/src/shared/db/client.ts @@ -1,6 +1,6 @@ import { PrismaClient } from "@prisma/client"; -import pg, { Knex } from "knex"; -import { PrismaTransaction } from "../schema/prisma"; +import pg, { type Knex } from "knex"; +import type { PrismaTransaction } from "../schemas/prisma"; import { env } from "../utils/env"; export const prisma = new PrismaClient({ @@ -26,7 +26,7 @@ export const isDatabaseReachable = async () => { try { await prisma.walletDetails.findFirst(); return true; - } catch (error) { + } catch { return false; } }; diff --git a/src/db/configuration/getConfiguration.ts b/src/shared/db/configuration/getConfiguration.ts similarity index 98% rename from src/db/configuration/getConfiguration.ts rename to src/shared/db/configuration/getConfiguration.ts index 67c47f9a6..5d1698ccd 100644 --- a/src/db/configuration/getConfiguration.ts +++ b/src/shared/db/configuration/getConfiguration.ts @@ -7,9 +7,9 @@ import type { AwsWalletConfiguration, GcpWalletConfiguration, ParsedConfig, -} from "../../schema/config"; -import { WalletType } from "../../schema/wallet"; -import { mandatoryAllowedCorsUrls } from "../../server/utils/cors-urls"; +} from "../../schemas/config"; +import { WalletType } from "../../schemas/wallet"; +import { mandatoryAllowedCorsUrls } from "../../../server/utils/cors-urls"; import type { networkResponseSchema } from "../../utils/cache/getSdk"; import { decrypt } from "../../utils/crypto"; import { env } from "../../utils/env"; diff --git a/src/db/configuration/updateConfiguration.ts b/src/shared/db/configuration/updateConfiguration.ts similarity index 100% rename from src/db/configuration/updateConfiguration.ts rename to src/shared/db/configuration/updateConfiguration.ts diff --git a/src/db/contractEventLogs/createContractEventLogs.ts b/src/shared/db/contractEventLogs/createContractEventLogs.ts similarity index 78% rename from src/db/contractEventLogs/createContractEventLogs.ts rename to src/shared/db/contractEventLogs/createContractEventLogs.ts index cb498e9c1..5b4c94e13 100644 --- a/src/db/contractEventLogs/createContractEventLogs.ts +++ b/src/shared/db/contractEventLogs/createContractEventLogs.ts @@ -1,5 +1,5 @@ -import { ContractEventLogs, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schema/prisma"; +import type { ContractEventLogs, Prisma } from "@prisma/client"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/db/contractEventLogs/deleteContractEventLogs.ts b/src/shared/db/contractEventLogs/deleteContractEventLogs.ts similarity index 100% rename from src/db/contractEventLogs/deleteContractEventLogs.ts rename to src/shared/db/contractEventLogs/deleteContractEventLogs.ts diff --git a/src/db/contractEventLogs/getContractEventLogs.ts b/src/shared/db/contractEventLogs/getContractEventLogs.ts similarity index 100% rename from src/db/contractEventLogs/getContractEventLogs.ts rename to src/shared/db/contractEventLogs/getContractEventLogs.ts diff --git a/src/db/contractSubscriptions/createContractSubscription.ts b/src/shared/db/contractSubscriptions/createContractSubscription.ts similarity index 100% rename from src/db/contractSubscriptions/createContractSubscription.ts rename to src/shared/db/contractSubscriptions/createContractSubscription.ts diff --git a/src/db/contractSubscriptions/deleteContractSubscription.ts b/src/shared/db/contractSubscriptions/deleteContractSubscription.ts similarity index 100% rename from src/db/contractSubscriptions/deleteContractSubscription.ts rename to src/shared/db/contractSubscriptions/deleteContractSubscription.ts diff --git a/src/db/contractSubscriptions/getContractSubscriptions.ts b/src/shared/db/contractSubscriptions/getContractSubscriptions.ts similarity index 100% rename from src/db/contractSubscriptions/getContractSubscriptions.ts rename to src/shared/db/contractSubscriptions/getContractSubscriptions.ts diff --git a/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts b/src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts similarity index 91% rename from src/db/contractTransactionReceipts/createContractTransactionReceipts.ts rename to src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts index 1cd733b4c..ac3396516 100644 --- a/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts +++ b/src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts @@ -1,5 +1,5 @@ import { ContractTransactionReceipts, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schema/prisma"; +import { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts b/src/shared/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts similarity index 100% rename from src/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts rename to src/shared/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts diff --git a/src/db/contractTransactionReceipts/getContractTransactionReceipts.ts b/src/shared/db/contractTransactionReceipts/getContractTransactionReceipts.ts similarity index 100% rename from src/db/contractTransactionReceipts/getContractTransactionReceipts.ts rename to src/shared/db/contractTransactionReceipts/getContractTransactionReceipts.ts diff --git a/src/db/keypair/delete.ts b/src/shared/db/keypair/delete.ts similarity index 100% rename from src/db/keypair/delete.ts rename to src/shared/db/keypair/delete.ts diff --git a/src/db/keypair/get.ts b/src/shared/db/keypair/get.ts similarity index 100% rename from src/db/keypair/get.ts rename to src/shared/db/keypair/get.ts diff --git a/src/db/keypair/insert.ts b/src/shared/db/keypair/insert.ts similarity index 72% rename from src/db/keypair/insert.ts rename to src/shared/db/keypair/insert.ts index c6d7b737d..77f1ada59 100644 --- a/src/db/keypair/insert.ts +++ b/src/shared/db/keypair/insert.ts @@ -1,6 +1,6 @@ -import { Keypairs } from "@prisma/client"; -import { createHash } from "crypto"; -import { KeypairAlgorithm } from "../../server/schemas/keypairs"; +import type { Keypairs } from "@prisma/client"; +import { createHash } from "node:crypto"; +import type { KeypairAlgorithm } from "../../schemas/keypair"; import { prisma } from "../client"; export const insertKeypair = async ({ diff --git a/src/db/keypair/list.ts b/src/shared/db/keypair/list.ts similarity index 100% rename from src/db/keypair/list.ts rename to src/shared/db/keypair/list.ts diff --git a/src/db/permissions/deletePermissions.ts b/src/shared/db/permissions/deletePermissions.ts similarity index 100% rename from src/db/permissions/deletePermissions.ts rename to src/shared/db/permissions/deletePermissions.ts diff --git a/src/db/permissions/getPermissions.ts b/src/shared/db/permissions/getPermissions.ts similarity index 92% rename from src/db/permissions/getPermissions.ts rename to src/shared/db/permissions/getPermissions.ts index 6d178b5eb..7017ae12e 100644 --- a/src/db/permissions/getPermissions.ts +++ b/src/shared/db/permissions/getPermissions.ts @@ -1,4 +1,4 @@ -import { Permission } from "../../server/schemas/auth"; +import { Permission } from "../../schemas/auth"; import { env } from "../../utils/env"; import { prisma } from "../client"; diff --git a/src/db/permissions/updatePermissions.ts b/src/shared/db/permissions/updatePermissions.ts similarity index 100% rename from src/db/permissions/updatePermissions.ts rename to src/shared/db/permissions/updatePermissions.ts diff --git a/src/db/relayer/getRelayerById.ts b/src/shared/db/relayer/getRelayerById.ts similarity index 100% rename from src/db/relayer/getRelayerById.ts rename to src/shared/db/relayer/getRelayerById.ts diff --git a/src/db/tokens/createToken.ts b/src/shared/db/tokens/createToken.ts similarity index 100% rename from src/db/tokens/createToken.ts rename to src/shared/db/tokens/createToken.ts diff --git a/src/db/tokens/getAccessTokens.ts b/src/shared/db/tokens/getAccessTokens.ts similarity index 100% rename from src/db/tokens/getAccessTokens.ts rename to src/shared/db/tokens/getAccessTokens.ts diff --git a/src/db/tokens/getToken.ts b/src/shared/db/tokens/getToken.ts similarity index 100% rename from src/db/tokens/getToken.ts rename to src/shared/db/tokens/getToken.ts diff --git a/src/db/tokens/revokeToken.ts b/src/shared/db/tokens/revokeToken.ts similarity index 100% rename from src/db/tokens/revokeToken.ts rename to src/shared/db/tokens/revokeToken.ts diff --git a/src/db/tokens/updateToken.ts b/src/shared/db/tokens/updateToken.ts similarity index 100% rename from src/db/tokens/updateToken.ts rename to src/shared/db/tokens/updateToken.ts diff --git a/src/db/transactions/db.ts b/src/shared/db/transactions/db.ts similarity index 100% rename from src/db/transactions/db.ts rename to src/shared/db/transactions/db.ts diff --git a/src/db/transactions/queueTx.ts b/src/shared/db/transactions/queueTx.ts similarity index 95% rename from src/db/transactions/queueTx.ts rename to src/shared/db/transactions/queueTx.ts index 76baa3656..4c12eeae0 100644 --- a/src/db/transactions/queueTx.ts +++ b/src/shared/db/transactions/queueTx.ts @@ -1,11 +1,11 @@ import type { DeployTransaction, Transaction } from "@thirdweb-dev/sdk"; import type { ERC4337EthersSigner } from "@thirdweb-dev/wallets/dist/declarations/src/evm/connectors/smart-wallet/lib/erc4337-signer"; import { ZERO_ADDRESS, type Address } from "thirdweb"; -import type { ContractExtension } from "../../schema/extension"; -import { parseTransactionOverrides } from "../../server/utils/transactionOverrides"; +import type { ContractExtension } from "../../schemas/extension"; import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; import { insertTransaction } from "../../utils/transaction/insertTransaction"; import type { InsertedTransaction } from "../../utils/transaction/types"; +import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; interface QueueTxParams { // we should move away from Transaction type (v4 SDK) diff --git a/src/db/wallets/createWalletDetails.ts b/src/shared/db/wallets/createWalletDetails.ts similarity index 98% rename from src/db/wallets/createWalletDetails.ts rename to src/shared/db/wallets/createWalletDetails.ts index 13f89c41a..2dbb2f242 100644 --- a/src/db/wallets/createWalletDetails.ts +++ b/src/shared/db/wallets/createWalletDetails.ts @@ -1,5 +1,5 @@ import type { Address } from "thirdweb"; -import type { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { encrypt } from "../../utils/crypto"; import { getPrismaWithPostgresTx } from "../client"; diff --git a/src/db/wallets/deleteWalletDetails.ts b/src/shared/db/wallets/deleteWalletDetails.ts similarity index 100% rename from src/db/wallets/deleteWalletDetails.ts rename to src/shared/db/wallets/deleteWalletDetails.ts diff --git a/src/db/wallets/getAllWallets.ts b/src/shared/db/wallets/getAllWallets.ts similarity index 86% rename from src/db/wallets/getAllWallets.ts rename to src/shared/db/wallets/getAllWallets.ts index fd8ef80a0..5f0603e81 100644 --- a/src/db/wallets/getAllWallets.ts +++ b/src/shared/db/wallets/getAllWallets.ts @@ -1,4 +1,4 @@ -import { PrismaTransaction } from "../../schema/prisma"; +import { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetAllWalletsParams { diff --git a/src/db/wallets/getWalletDetails.ts b/src/shared/db/wallets/getWalletDetails.ts similarity index 99% rename from src/db/wallets/getWalletDetails.ts rename to src/shared/db/wallets/getWalletDetails.ts index fcc8db3f5..fcbc8e9d6 100644 --- a/src/db/wallets/getWalletDetails.ts +++ b/src/shared/db/wallets/getWalletDetails.ts @@ -1,6 +1,6 @@ import { getAddress } from "thirdweb"; import { z } from "zod"; -import type { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getConfig } from "../../utils/cache/getConfig"; import { decrypt } from "../../utils/crypto"; import { env } from "../../utils/env"; diff --git a/src/db/wallets/nonceMap.ts b/src/shared/db/wallets/nonceMap.ts similarity index 98% rename from src/db/wallets/nonceMap.ts rename to src/shared/db/wallets/nonceMap.ts index 868b00dcc..aac67c2be 100644 --- a/src/db/wallets/nonceMap.ts +++ b/src/shared/db/wallets/nonceMap.ts @@ -1,4 +1,4 @@ -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { env } from "../../utils/env"; import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; diff --git a/src/db/wallets/updateWalletDetails.ts b/src/shared/db/wallets/updateWalletDetails.ts similarity index 100% rename from src/db/wallets/updateWalletDetails.ts rename to src/shared/db/wallets/updateWalletDetails.ts diff --git a/src/db/wallets/walletNonce.ts b/src/shared/db/wallets/walletNonce.ts similarity index 100% rename from src/db/wallets/walletNonce.ts rename to src/shared/db/wallets/walletNonce.ts diff --git a/src/db/webhooks/createWebhook.ts b/src/shared/db/webhooks/createWebhook.ts similarity index 91% rename from src/db/webhooks/createWebhook.ts rename to src/shared/db/webhooks/createWebhook.ts index 8e8bb66d7..7c32a5f13 100644 --- a/src/db/webhooks/createWebhook.ts +++ b/src/shared/db/webhooks/createWebhook.ts @@ -1,6 +1,6 @@ import { Webhooks } from "@prisma/client"; import { createHash, randomBytes } from "crypto"; -import { WebhooksEventTypes } from "../../schema/webhooks"; +import { WebhooksEventTypes } from "../../schemas/webhooks"; import { prisma } from "../client"; interface CreateWebhooksParams { diff --git a/src/db/webhooks/getAllWebhooks.ts b/src/shared/db/webhooks/getAllWebhooks.ts similarity index 100% rename from src/db/webhooks/getAllWebhooks.ts rename to src/shared/db/webhooks/getAllWebhooks.ts diff --git a/src/db/webhooks/getWebhook.ts b/src/shared/db/webhooks/getWebhook.ts similarity index 100% rename from src/db/webhooks/getWebhook.ts rename to src/shared/db/webhooks/getWebhook.ts diff --git a/src/db/webhooks/revokeWebhook.ts b/src/shared/db/webhooks/revokeWebhook.ts similarity index 100% rename from src/db/webhooks/revokeWebhook.ts rename to src/shared/db/webhooks/revokeWebhook.ts diff --git a/src/lib/cache/swr.ts b/src/shared/lib/cache/swr.ts similarity index 100% rename from src/lib/cache/swr.ts rename to src/shared/lib/cache/swr.ts diff --git a/src/lib/chain/chain-capabilities.ts b/src/shared/lib/chain/chain-capabilities.ts similarity index 100% rename from src/lib/chain/chain-capabilities.ts rename to src/shared/lib/chain/chain-capabilities.ts diff --git a/src/lib/transaction/get-transaction-receipt.ts b/src/shared/lib/transaction/get-transaction-receipt.ts similarity index 100% rename from src/lib/transaction/get-transaction-receipt.ts rename to src/shared/lib/transaction/get-transaction-receipt.ts diff --git a/src/server/schemas/auth/index.ts b/src/shared/schemas/auth.ts similarity index 100% rename from src/server/schemas/auth/index.ts rename to src/shared/schemas/auth.ts diff --git a/src/schema/config.ts b/src/shared/schemas/config.ts similarity index 100% rename from src/schema/config.ts rename to src/shared/schemas/config.ts diff --git a/src/schema/extension.ts b/src/shared/schemas/extension.ts similarity index 100% rename from src/schema/extension.ts rename to src/shared/schemas/extension.ts diff --git a/src/server/schemas/keypairs.ts b/src/shared/schemas/keypair.ts similarity index 93% rename from src/server/schemas/keypairs.ts rename to src/shared/schemas/keypair.ts index 31a3a7bc7..5e0a85bc3 100644 --- a/src/server/schemas/keypairs.ts +++ b/src/shared/schemas/keypair.ts @@ -1,5 +1,5 @@ -import { Keypairs } from "@prisma/client"; -import { Static, Type } from "@sinclair/typebox"; +import type { Keypairs } from "@prisma/client"; +import { type Static, Type } from "@sinclair/typebox"; // https://github.com/auth0/node-jsonwebtoken#algorithms-supported const _supportedAlgorithms = [ diff --git a/src/schema/prisma.ts b/src/shared/schemas/prisma.ts similarity index 100% rename from src/schema/prisma.ts rename to src/shared/schemas/prisma.ts diff --git a/src/constants/relayer.ts b/src/shared/schemas/relayer.ts similarity index 100% rename from src/constants/relayer.ts rename to src/shared/schemas/relayer.ts diff --git a/src/schema/wallet.ts b/src/shared/schemas/wallet.ts similarity index 100% rename from src/schema/wallet.ts rename to src/shared/schemas/wallet.ts diff --git a/src/schema/webhooks.ts b/src/shared/schemas/webhooks.ts similarity index 100% rename from src/schema/webhooks.ts rename to src/shared/schemas/webhooks.ts diff --git a/src/utils/account.ts b/src/shared/utils/account.ts similarity index 93% rename from src/utils/account.ts rename to src/shared/utils/account.ts index 0c8373f7d..ef3d83e68 100644 --- a/src/utils/account.ts +++ b/src/shared/utils/account.ts @@ -6,15 +6,15 @@ import { isSmartBackendWallet, type ParsedWalletDetails, } from "../db/wallets/getWalletDetails"; -import { WalletType } from "../schema/wallet"; -import { splitAwsKmsArn } from "../server/utils/wallets/awsKmsArn"; -import { getConnectedSmartWallet } from "../server/utils/wallets/createSmartWallet"; -import { getAwsKmsAccount } from "../server/utils/wallets/getAwsKmsAccount"; -import { getGcpKmsAccount } from "../server/utils/wallets/getGcpKmsAccount"; +import { WalletType } from "../schemas/wallet"; +import { splitAwsKmsArn } from "../../server/utils/wallets/awsKmsArn"; +import { getConnectedSmartWallet } from "../../server/utils/wallets/createSmartWallet"; +import { getAwsKmsAccount } from "../../server/utils/wallets/getAwsKmsAccount"; +import { getGcpKmsAccount } from "../../server/utils/wallets/getGcpKmsAccount"; import { encryptedJsonToAccount, getLocalWalletAccount, -} from "../server/utils/wallets/getLocalWallet"; +} from "../../server/utils/wallets/getLocalWallet"; import { getSmartWalletV5 } from "./cache/getSmartWalletV5"; import { getChain } from "./chain"; import { thirdwebClient } from "./sdk"; diff --git a/src/utils/auth.ts b/src/shared/utils/auth.ts similarity index 100% rename from src/utils/auth.ts rename to src/shared/utils/auth.ts diff --git a/src/utils/block.ts b/src/shared/utils/block.ts similarity index 100% rename from src/utils/block.ts rename to src/shared/utils/block.ts diff --git a/src/utils/cache/accessToken.ts b/src/shared/utils/cache/accessToken.ts similarity index 100% rename from src/utils/cache/accessToken.ts rename to src/shared/utils/cache/accessToken.ts diff --git a/src/utils/cache/authWallet.ts b/src/shared/utils/cache/authWallet.ts similarity index 100% rename from src/utils/cache/authWallet.ts rename to src/shared/utils/cache/authWallet.ts diff --git a/src/utils/cache/clearCache.ts b/src/shared/utils/cache/clearCache.ts similarity index 100% rename from src/utils/cache/clearCache.ts rename to src/shared/utils/cache/clearCache.ts diff --git a/src/utils/cache/getConfig.ts b/src/shared/utils/cache/getConfig.ts similarity index 86% rename from src/utils/cache/getConfig.ts rename to src/shared/utils/cache/getConfig.ts index 59b9850e9..f18937576 100644 --- a/src/utils/cache/getConfig.ts +++ b/src/shared/utils/cache/getConfig.ts @@ -1,5 +1,5 @@ import { getConfiguration } from "../../db/configuration/getConfiguration"; -import type { ParsedConfig } from "../../schema/config"; +import type { ParsedConfig } from "../../schemas/config"; let _config: ParsedConfig | null = null; diff --git a/src/utils/cache/getContract.ts b/src/shared/utils/cache/getContract.ts similarity index 82% rename from src/utils/cache/getContract.ts rename to src/shared/utils/cache/getContract.ts index 4ace9a679..b9b4dcb51 100644 --- a/src/utils/cache/getContract.ts +++ b/src/shared/utils/cache/getContract.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { StatusCodes } from "http-status-codes"; -import { createCustomError } from "../../server/middleware/error"; -import { abiSchema } from "../../server/schemas/contract"; +import { createCustomError } from "../../../server/middleware/error"; +import { abiSchema } from "../../../server/schemas/contract"; import { getSdk } from "./getSdk"; const abiArraySchema = Type.Array(abiSchema); diff --git a/src/utils/cache/getContractv5.ts b/src/shared/utils/cache/getContractv5.ts similarity index 100% rename from src/utils/cache/getContractv5.ts rename to src/shared/utils/cache/getContractv5.ts diff --git a/src/utils/cache/getSdk.ts b/src/shared/utils/cache/getSdk.ts similarity index 97% rename from src/utils/cache/getSdk.ts rename to src/shared/utils/cache/getSdk.ts index 42c754610..f15781715 100644 --- a/src/utils/cache/getSdk.ts +++ b/src/shared/utils/cache/getSdk.ts @@ -2,7 +2,7 @@ import { Type } from "@sinclair/typebox"; import { ThirdwebSDK } from "@thirdweb-dev/sdk"; import LRUMap from "mnemonist/lru-map"; import { getChainMetadata } from "thirdweb/chains"; -import { badChainError } from "../../server/middleware/error"; +import { badChainError } from "../../../server/middleware/error"; import { getChain } from "../chain"; import { env } from "../env"; import { getWallet } from "./getWallet"; diff --git a/src/utils/cache/getSmartWalletV5.ts b/src/shared/utils/cache/getSmartWalletV5.ts similarity index 100% rename from src/utils/cache/getSmartWalletV5.ts rename to src/shared/utils/cache/getSmartWalletV5.ts diff --git a/src/utils/cache/getWallet.ts b/src/shared/utils/cache/getWallet.ts similarity index 91% rename from src/utils/cache/getWallet.ts rename to src/shared/utils/cache/getWallet.ts index 6b078594b..520cf924f 100644 --- a/src/utils/cache/getWallet.ts +++ b/src/shared/utils/cache/getWallet.ts @@ -7,13 +7,13 @@ import { getWalletDetails, type ParsedWalletDetails, } from "../../db/wallets/getWalletDetails"; -import type { PrismaTransaction } from "../../schema/prisma"; -import { WalletType } from "../../schema/wallet"; -import { createCustomError } from "../../server/middleware/error"; -import { splitAwsKmsArn } from "../../server/utils/wallets/awsKmsArn"; -import { splitGcpKmsResourcePath } from "../../server/utils/wallets/gcpKmsResourcePath"; -import { getLocalWallet } from "../../server/utils/wallets/getLocalWallet"; -import { getSmartWallet } from "../../server/utils/wallets/getSmartWallet"; +import type { PrismaTransaction } from "../../schemas/prisma"; +import { WalletType } from "../../schemas/wallet"; +import { createCustomError } from "../../../server/middleware/error"; +import { splitAwsKmsArn } from "../../../server/utils/wallets/awsKmsArn"; +import { splitGcpKmsResourcePath } from "../../../server/utils/wallets/gcpKmsResourcePath"; +import { getLocalWallet } from "../../../server/utils/wallets/getLocalWallet"; +import { getSmartWallet } from "../../../server/utils/wallets/getSmartWallet"; export const walletsCache = new LRUMap(2048); diff --git a/src/utils/cache/getWebhook.ts b/src/shared/utils/cache/getWebhook.ts similarity index 91% rename from src/utils/cache/getWebhook.ts rename to src/shared/utils/cache/getWebhook.ts index ded5543df..1ed9df187 100644 --- a/src/utils/cache/getWebhook.ts +++ b/src/shared/utils/cache/getWebhook.ts @@ -1,7 +1,7 @@ import type { Webhooks } from "@prisma/client"; import LRUMap from "mnemonist/lru-map"; import { getAllWebhooks } from "../../db/webhooks/getAllWebhooks"; -import type { WebhooksEventTypes } from "../../schema/webhooks"; +import type { WebhooksEventTypes } from "../../schemas/webhooks"; export const webhookCache = new LRUMap(2048); diff --git a/src/utils/cache/keypair.ts b/src/shared/utils/cache/keypair.ts similarity index 100% rename from src/utils/cache/keypair.ts rename to src/shared/utils/cache/keypair.ts diff --git a/src/utils/chain.ts b/src/shared/utils/chain.ts similarity index 100% rename from src/utils/chain.ts rename to src/shared/utils/chain.ts diff --git a/src/utils/cron/clearCacheCron.ts b/src/shared/utils/cron/clearCacheCron.ts similarity index 100% rename from src/utils/cron/clearCacheCron.ts rename to src/shared/utils/cron/clearCacheCron.ts diff --git a/src/utils/cron/isValidCron.ts b/src/shared/utils/cron/isValidCron.ts similarity index 96% rename from src/utils/cron/isValidCron.ts rename to src/shared/utils/cron/isValidCron.ts index f0ea16ccf..abfdc5715 100644 --- a/src/utils/cron/isValidCron.ts +++ b/src/shared/utils/cron/isValidCron.ts @@ -1,6 +1,6 @@ import cronParser from "cron-parser"; import { StatusCodes } from "http-status-codes"; -import { createCustomError } from "../../server/middleware/error"; +import { createCustomError } from "../../../server/middleware/error"; export const isValidCron = (input: string): boolean => { try { diff --git a/src/utils/crypto.ts b/src/shared/utils/crypto.ts similarity index 100% rename from src/utils/crypto.ts rename to src/shared/utils/crypto.ts diff --git a/src/utils/date.ts b/src/shared/utils/date.ts similarity index 100% rename from src/utils/date.ts rename to src/shared/utils/date.ts diff --git a/src/utils/env.ts b/src/shared/utils/env.ts similarity index 100% rename from src/utils/env.ts rename to src/shared/utils/env.ts diff --git a/src/utils/error.ts b/src/shared/utils/error.ts similarity index 100% rename from src/utils/error.ts rename to src/shared/utils/error.ts diff --git a/src/utils/ethers.ts b/src/shared/utils/ethers.ts similarity index 100% rename from src/utils/ethers.ts rename to src/shared/utils/ethers.ts diff --git a/src/utils/indexer/getBlockTime.ts b/src/shared/utils/indexer/getBlockTime.ts similarity index 100% rename from src/utils/indexer/getBlockTime.ts rename to src/shared/utils/indexer/getBlockTime.ts diff --git a/src/utils/logger.ts b/src/shared/utils/logger.ts similarity index 100% rename from src/utils/logger.ts rename to src/shared/utils/logger.ts diff --git a/src/utils/math.ts b/src/shared/utils/math.ts similarity index 100% rename from src/utils/math.ts rename to src/shared/utils/math.ts diff --git a/src/utils/primitiveTypes.ts b/src/shared/utils/primitiveTypes.ts similarity index 100% rename from src/utils/primitiveTypes.ts rename to src/shared/utils/primitiveTypes.ts diff --git a/src/utils/prometheus.ts b/src/shared/utils/prometheus.ts similarity index 98% rename from src/utils/prometheus.ts rename to src/shared/utils/prometheus.ts index abfb9b8e0..dbada9ad4 100644 --- a/src/utils/prometheus.ts +++ b/src/shared/utils/prometheus.ts @@ -1,7 +1,7 @@ import fastify from "fastify"; import { Counter, Gauge, Histogram, Registry } from "prom-client"; import { getUsedBackendWallets, inspectNonce } from "../db/wallets/walletNonce"; -import { getLastUsedOnchainNonce } from "../server/routes/admin/nonces"; +import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; const nonceMetrics = new Gauge({ name: "engine_nonces", diff --git a/src/utils/redis/lock.ts b/src/shared/utils/redis/lock.ts similarity index 100% rename from src/utils/redis/lock.ts rename to src/shared/utils/redis/lock.ts diff --git a/src/utils/redis/redis.ts b/src/shared/utils/redis/redis.ts similarity index 100% rename from src/utils/redis/redis.ts rename to src/shared/utils/redis/redis.ts diff --git a/src/utils/sdk.ts b/src/shared/utils/sdk.ts similarity index 100% rename from src/utils/sdk.ts rename to src/shared/utils/sdk.ts diff --git a/src/utils/transaction/cancelTransaction.ts b/src/shared/utils/transaction/cancelTransaction.ts similarity index 100% rename from src/utils/transaction/cancelTransaction.ts rename to src/shared/utils/transaction/cancelTransaction.ts diff --git a/src/utils/transaction/insertTransaction.ts b/src/shared/utils/transaction/insertTransaction.ts similarity index 95% rename from src/utils/transaction/insertTransaction.ts rename to src/shared/utils/transaction/insertTransaction.ts index fe79018fb..5d4f33da4 100644 --- a/src/utils/transaction/insertTransaction.ts +++ b/src/shared/utils/transaction/insertTransaction.ts @@ -1,14 +1,14 @@ import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; -import { TransactionDB } from "../../db/transactions/db"; +import { TransactionDB } from "../../../shared/db/transactions/db"; import { getWalletDetails, isSmartBackendWallet, type ParsedWalletDetails, -} from "../../db/wallets/getWalletDetails"; +} from "../../../shared/db/wallets/getWalletDetails"; import { doesChainSupportService } from "../../lib/chain/chain-capabilities"; -import { createCustomError } from "../../server/middleware/error"; -import { SendTransactionQueue } from "../../worker/queues/sendTransactionQueue"; +import { createCustomError } from "../../../server/middleware/error"; +import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { getChecksumAddress } from "../primitiveTypes"; import { recordMetrics } from "../prometheus"; import { reportUsage } from "../usage"; diff --git a/src/utils/transaction/queueTransation.ts b/src/shared/utils/transaction/queueTransation.ts similarity index 90% rename from src/utils/transaction/queueTransation.ts rename to src/shared/utils/transaction/queueTransation.ts index cdaf2245d..e883a83aa 100644 --- a/src/utils/transaction/queueTransation.ts +++ b/src/shared/utils/transaction/queueTransation.ts @@ -7,9 +7,9 @@ import { type PreparedTransaction, } from "thirdweb"; import { resolvePromisedValue } from "thirdweb/utils"; -import { createCustomError } from "../../server/middleware/error"; -import type { txOverridesWithValueSchema } from "../../server/schemas/txOverrides"; -import { parseTransactionOverrides } from "../../server/utils/transactionOverrides"; +import { createCustomError } from "../../../server/middleware/error"; +import type { txOverridesWithValueSchema } from "../../../server/schemas/txOverrides"; +import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; import { prettifyError } from "../error"; import { insertTransaction } from "./insertTransaction"; import type { InsertedTransaction } from "./types"; diff --git a/src/utils/transaction/simulateQueuedTransaction.ts b/src/shared/utils/transaction/simulateQueuedTransaction.ts similarity index 100% rename from src/utils/transaction/simulateQueuedTransaction.ts rename to src/shared/utils/transaction/simulateQueuedTransaction.ts diff --git a/src/utils/transaction/types.ts b/src/shared/utils/transaction/types.ts similarity index 100% rename from src/utils/transaction/types.ts rename to src/shared/utils/transaction/types.ts diff --git a/src/utils/transaction/webhook.ts b/src/shared/utils/transaction/webhook.ts similarity index 80% rename from src/utils/transaction/webhook.ts rename to src/shared/utils/transaction/webhook.ts index 40cb71ed0..159844a9d 100644 --- a/src/utils/transaction/webhook.ts +++ b/src/shared/utils/transaction/webhook.ts @@ -1,5 +1,5 @@ -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { SendWebhookQueue } from "../../worker/queues/sendWebhookQueue"; +import { WebhooksEventTypes } from "../../schemas/webhooks"; +import { SendWebhookQueue } from "../../../worker/queues/sendWebhookQueue"; import type { AnyTransaction } from "./types"; export const enqueueTransactionWebhook = async ( diff --git a/src/utils/usage.ts b/src/shared/utils/usage.ts similarity index 86% rename from src/utils/usage.ts rename to src/shared/utils/usage.ts index 002c437c8..97de003e3 100644 --- a/src/utils/usage.ts +++ b/src/shared/utils/usage.ts @@ -1,12 +1,12 @@ -import { Static } from "@sinclair/typebox"; -import { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; -import { FastifyInstance } from "fastify"; -import { Address, Hex } from "thirdweb"; -import { ADMIN_QUEUES_BASEPATH } from "../server/middleware/adminRoutes"; -import { OPENAPI_ROUTES } from "../server/middleware/openApi"; -import { contractParamSchema } from "../server/schemas/sharedApiSchemas"; -import { walletWithAddressParamSchema } from "../server/schemas/wallet"; -import { getChainIdFromChain } from "../server/utils/chain"; +import type { Static } from "@sinclair/typebox"; +import type { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; +import type { FastifyInstance } from "fastify"; +import type { Address, Hex } from "thirdweb"; +import { ADMIN_QUEUES_BASEPATH } from "../../server/middleware/adminRoutes"; +import { OPENAPI_ROUTES } from "../../server/middleware/openApi"; +import type { contractParamSchema } from "../../server/schemas/sharedApiSchemas"; +import type { walletWithAddressParamSchema } from "../../server/schemas/wallet"; +import { getChainIdFromChain } from "../../server/utils/chain"; import { env } from "./env"; import { logger } from "./logger"; import { thirdwebClientId } from "./sdk"; diff --git a/src/utils/webhook.ts b/src/shared/utils/webhook.ts similarity index 100% rename from src/utils/webhook.ts rename to src/shared/utils/webhook.ts diff --git a/src/utils/tracer.ts b/src/tracer.ts similarity index 79% rename from src/utils/tracer.ts rename to src/tracer.ts index c07e15c1a..4aae137e3 100644 --- a/src/utils/tracer.ts +++ b/src/tracer.ts @@ -1,5 +1,5 @@ import tracer from "dd-trace"; -import { env } from "./env"; +import { env } from "./shared/utils/env"; if (env.DD_TRACER_ACTIVATED) { tracer.init(); // initialized in a different file to avoid hoisting. diff --git a/src/worker/indexers/chainIndexerRegistry.ts b/src/worker/indexers/chainIndexerRegistry.ts index df37adde8..760b556f1 100644 --- a/src/worker/indexers/chainIndexerRegistry.ts +++ b/src/worker/indexers/chainIndexerRegistry.ts @@ -1,6 +1,6 @@ import cron from "node-cron"; -import { getBlockTimeSeconds } from "../../utils/indexer/getBlockTime"; -import { logger } from "../../utils/logger"; +import { getBlockTimeSeconds } from "../../shared/utils/indexer/getBlockTime"; +import { logger } from "../../shared/utils/logger"; import { handleContractSubscriptions } from "../tasks/chainIndexer"; // @TODO: Move all worker logic to Bullmq to better handle multiple hosts. diff --git a/src/worker/listeners/chainIndexerListener.ts b/src/worker/listeners/chainIndexerListener.ts index e7be532dc..186aee895 100644 --- a/src/worker/listeners/chainIndexerListener.ts +++ b/src/worker/listeners/chainIndexerListener.ts @@ -1,6 +1,6 @@ import cron from "node-cron"; -import { getConfig } from "../../utils/cache/getConfig"; -import { logger } from "../../utils/logger"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { logger } from "../../shared/utils/logger"; import { manageChainIndexers } from "../tasks/manageChainIndexers"; let processChainIndexerStarted = false; diff --git a/src/worker/listeners/configListener.ts b/src/worker/listeners/configListener.ts index 48213c731..62594280d 100644 --- a/src/worker/listeners/configListener.ts +++ b/src/worker/listeners/configListener.ts @@ -1,7 +1,7 @@ -import { knex } from "../../db/client"; -import { getConfig } from "../../utils/cache/getConfig"; -import { clearCacheCron } from "../../utils/cron/clearCacheCron"; -import { logger } from "../../utils/logger"; +import { knex } from "../../shared/db/client"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { clearCacheCron } from "../../shared/utils/cron/clearCacheCron"; +import { logger } from "../../shared/utils/logger"; import { chainIndexerListener } from "./chainIndexerListener"; export const newConfigurationListener = async (): Promise => { diff --git a/src/worker/listeners/webhookListener.ts b/src/worker/listeners/webhookListener.ts index 2ab19ba2f..d1ab64e18 100644 --- a/src/worker/listeners/webhookListener.ts +++ b/src/worker/listeners/webhookListener.ts @@ -1,6 +1,6 @@ -import { knex } from "../../db/client"; -import { webhookCache } from "../../utils/cache/getWebhook"; -import { logger } from "../../utils/logger"; +import { knex } from "../../shared/db/client"; +import { webhookCache } from "../../shared/utils/cache/getWebhook"; +import { logger } from "../../shared/utils/logger"; export const newWebhooksListener = async (): Promise => { logger({ diff --git a/src/worker/queues/cancelRecycledNoncesQueue.ts b/src/worker/queues/cancelRecycledNoncesQueue.ts index ff2991d52..28bc4fde9 100644 --- a/src/worker/queues/cancelRecycledNoncesQueue.ts +++ b/src/worker/queues/cancelRecycledNoncesQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class CancelRecycledNoncesQueue { diff --git a/src/worker/queues/mineTransactionQueue.ts b/src/worker/queues/mineTransactionQueue.ts index 977a727b5..adb62adcb 100644 --- a/src/worker/queues/mineTransactionQueue.ts +++ b/src/worker/queues/mineTransactionQueue.ts @@ -1,7 +1,7 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { env } from "../../utils/env"; -import { redis } from "../../utils/redis/redis"; +import { env } from "../../shared/utils/env"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type MineTransactionData = { diff --git a/src/worker/queues/nonceHealthCheckQueue.ts b/src/worker/queues/nonceHealthCheckQueue.ts index 31795e7ec..80ddf5453 100644 --- a/src/worker/queues/nonceHealthCheckQueue.ts +++ b/src/worker/queues/nonceHealthCheckQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class NonceHealthCheckQueue { diff --git a/src/worker/queues/nonceResyncQueue.ts b/src/worker/queues/nonceResyncQueue.ts index 23fbf22bc..59ca44b65 100644 --- a/src/worker/queues/nonceResyncQueue.ts +++ b/src/worker/queues/nonceResyncQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class NonceResyncQueue { diff --git a/src/worker/queues/processEventLogsQueue.ts b/src/worker/queues/processEventLogsQueue.ts index 1c32ad36f..de3c97a0d 100644 --- a/src/worker/queues/processEventLogsQueue.ts +++ b/src/worker/queues/processEventLogsQueue.ts @@ -1,8 +1,8 @@ import { Queue } from "bullmq"; import SuperJSON from "superjson"; -import { Address } from "thirdweb"; -import { getConfig } from "../../utils/cache/getConfig"; -import { redis } from "../../utils/redis/redis"; +import type { Address } from "thirdweb"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; // Each job handles a block range for a given chain, filtered by addresses + events. diff --git a/src/worker/queues/processTransactionReceiptsQueue.ts b/src/worker/queues/processTransactionReceiptsQueue.ts index 0f595e73f..6ee7c7557 100644 --- a/src/worker/queues/processTransactionReceiptsQueue.ts +++ b/src/worker/queues/processTransactionReceiptsQueue.ts @@ -1,8 +1,8 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { Address } from "thirdweb"; -import { getConfig } from "../../utils/cache/getConfig"; -import { redis } from "../../utils/redis/redis"; +import type { Address } from "thirdweb"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; // Each job handles a block range for a given chain, filtered by addresses + events. diff --git a/src/worker/queues/pruneTransactionsQueue.ts b/src/worker/queues/pruneTransactionsQueue.ts index 717162f77..5786346cd 100644 --- a/src/worker/queues/pruneTransactionsQueue.ts +++ b/src/worker/queues/pruneTransactionsQueue.ts @@ -1,5 +1,5 @@ import { Queue } from "bullmq"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export class PruneTransactionsQueue { diff --git a/src/worker/queues/queues.ts b/src/worker/queues/queues.ts index d22534c37..6331d3a8d 100644 --- a/src/worker/queues/queues.ts +++ b/src/worker/queues/queues.ts @@ -1,6 +1,6 @@ import type { Job, JobsOptions, Worker } from "bullmq"; -import { env } from "../../utils/env"; -import { logger } from "../../utils/logger"; +import { env } from "../../shared/utils/env"; +import { logger } from "../../shared/utils/logger"; export const defaultJobOptions: JobsOptions = { // Does not retry by default. Queues must explicitly define their own retry count and backoff behavior. diff --git a/src/worker/queues/sendTransactionQueue.ts b/src/worker/queues/sendTransactionQueue.ts index ba93068b8..4f4db261b 100644 --- a/src/worker/queues/sendTransactionQueue.ts +++ b/src/worker/queues/sendTransactionQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { redis } from "../../utils/redis/redis"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type SendTransactionData = { diff --git a/src/worker/queues/sendWebhookQueue.ts b/src/worker/queues/sendWebhookQueue.ts index 1861e4375..a39bb7468 100644 --- a/src/worker/queues/sendWebhookQueue.ts +++ b/src/worker/queues/sendWebhookQueue.ts @@ -8,10 +8,10 @@ import SuperJSON from "superjson"; import { WebhooksEventTypes, type BackendWalletBalanceWebhookParams, -} from "../../schema/webhooks"; -import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; +} from "../../shared/schemas/webhooks"; +import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; export type EnqueueContractSubscriptionWebhookData = { diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancelRecycledNoncesWorker.ts index 6b8b6a125..2fa58212a 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancelRecycledNoncesWorker.ts @@ -1,10 +1,10 @@ -import { Job, Processor, Worker } from "bullmq"; -import { Address } from "thirdweb"; -import { recycleNonce } from "../../db/wallets/walletNonce"; -import { isNonceAlreadyUsedError } from "../../utils/error"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; -import { sendCancellationTransaction } from "../../utils/transaction/cancelTransaction"; +import { type Job, type Processor, Worker } from "bullmq"; +import type { Address } from "thirdweb"; +import { recycleNonce } from "../../shared/db/wallets/walletNonce"; +import { isNonceAlreadyUsedError } from "../../shared/utils/error"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; +import { sendCancellationTransaction } from "../../shared/utils/transaction/cancelTransaction"; import { CancelRecycledNoncesQueue } from "../queues/cancelRecycledNoncesQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chainIndexer.ts index a7fbcc304..41bf92288 100644 --- a/src/worker/tasks/chainIndexer.ts +++ b/src/worker/tasks/chainIndexer.ts @@ -4,13 +4,13 @@ import { getRpcClient, type Address, } from "thirdweb"; -import { getBlockForIndexing } from "../../db/chainIndexers/getChainIndexer"; -import { upsertChainIndexer } from "../../db/chainIndexers/upsertChainIndexer"; -import { prisma } from "../../db/client"; -import { getContractSubscriptionsByChainId } from "../../db/contractSubscriptions/getContractSubscriptions"; -import { getChain } from "../../utils/chain"; -import { logger } from "../../utils/logger"; -import { thirdwebClient } from "../../utils/sdk"; +import { getBlockForIndexing } from "../../shared/db/chainIndexers/getChainIndexer"; +import { upsertChainIndexer } from "../../shared/db/chainIndexers/upsertChainIndexer"; +import { prisma } from "../../shared/db/client"; +import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getChain } from "../../shared/utils/chain"; +import { logger } from "../../shared/utils/logger"; +import { thirdwebClient } from "../../shared/utils/sdk"; import { ProcessEventsLogQueue } from "../queues/processEventLogsQueue"; import { ProcessTransactionReceiptsQueue } from "../queues/processTransactionReceiptsQueue"; diff --git a/src/worker/tasks/manageChainIndexers.ts b/src/worker/tasks/manageChainIndexers.ts index 741562ee7..787f88116 100644 --- a/src/worker/tasks/manageChainIndexers.ts +++ b/src/worker/tasks/manageChainIndexers.ts @@ -1,4 +1,4 @@ -import { getContractSubscriptionsUniqueChainIds } from "../../db/contractSubscriptions/getContractSubscriptions"; +import { getContractSubscriptionsUniqueChainIds } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; import { INDEXER_REGISTRY, addChainIndexer, diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index f054b2915..a9d09edc5 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -10,31 +10,34 @@ import { } from "thirdweb"; import { stringify } from "thirdweb/utils"; import { getUserOpReceipt } from "thirdweb/wallets/smart"; -import { TransactionDB } from "../../db/transactions/db"; -import { recycleNonce, removeSentNonce } from "../../db/wallets/walletNonce"; +import { TransactionDB } from "../../shared/db/transactions/db"; +import { + recycleNonce, + removeSentNonce, +} from "../../shared/db/wallets/walletNonce"; import { getReceiptForEOATransaction, getReceiptForUserOp, -} from "../../lib/transaction/get-transaction-receipt"; -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { getBlockNumberish } from "../../utils/block"; -import { getConfig } from "../../utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; -import { getChain } from "../../utils/chain"; -import { msSince } from "../../utils/date"; -import { env } from "../../utils/env"; -import { prettifyError } from "../../utils/error"; -import { logger } from "../../utils/logger"; -import { recordMetrics } from "../../utils/prometheus"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +} from "../../shared/lib/transaction/get-transaction-receipt"; +import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; +import { getBlockNumberish } from "../../shared/utils/block"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { getChain } from "../../shared/utils/chain"; +import { msSince } from "../../shared/utils/date"; +import { env } from "../../shared/utils/env"; +import { prettifyError } from "../../shared/utils/error"; +import { logger } from "../../shared/utils/logger"; +import { recordMetrics } from "../../shared/utils/prometheus"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import type { ErroredTransaction, MinedTransaction, SentTransaction, -} from "../../utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../utils/transaction/webhook"; -import { reportUsage } from "../../utils/usage"; +} from "../../shared/utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../shared/utils/transaction/webhook"; +import { reportUsage } from "../../shared/utils/usage"; import { MineTransactionQueue, type MineTransactionData, diff --git a/src/worker/tasks/nonceHealthCheckWorker.ts b/src/worker/tasks/nonceHealthCheckWorker.ts index 4d528c0c8..2c2ab63a3 100644 --- a/src/worker/tasks/nonceHealthCheckWorker.ts +++ b/src/worker/tasks/nonceHealthCheckWorker.ts @@ -3,10 +3,10 @@ import { getAddress, type Address } from "thirdweb"; import { getUsedBackendWallets, inspectNonce, -} from "../../db/wallets/walletNonce"; +} from "../../shared/db/wallets/walletNonce"; import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; import { NonceHealthCheckQueue } from "../queues/nonceHealthCheckQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonceResyncWorker.ts index 8f5cb0c65..144390076 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -5,13 +5,13 @@ import { isSentNonce, recycleNonce, splitSentNoncesKey, -} from "../../db/wallets/walletNonce"; -import { getConfig } from "../../utils/cache/getConfig"; -import { getChain } from "../../utils/chain"; -import { prettifyError } from "../../utils/error"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +} from "../../shared/db/wallets/walletNonce"; +import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getChain } from "../../shared/utils/chain"; +import { prettifyError } from "../../shared/utils/error"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import { NonceResyncQueue } from "../queues/nonceResyncQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index b3ad7c5fa..b1fd0c357 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -15,16 +15,16 @@ import { type ThirdwebContract, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import { bulkInsertContractEventLogs } from "../../db/contractEventLogs/createContractEventLogs"; -import { getContractSubscriptionsByChainId } from "../../db/contractSubscriptions/getContractSubscriptions"; -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { getChain } from "../../utils/chain"; -import { logger } from "../../utils/logger"; -import { normalizeAddress } from "../../utils/primitiveTypes"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +import { bulkInsertContractEventLogs } from "../../shared/db/contractEventLogs/createContractEventLogs"; +import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; +import { getChain } from "../../shared/utils/chain"; +import { logger } from "../../shared/utils/logger"; +import { normalizeAddress } from "../../shared/utils/primitiveTypes"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import { - EnqueueProcessEventLogsData, + type EnqueueProcessEventLogsData, ProcessEventsLogQueue, } from "../queues/processEventLogsQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index d8cdb23ae..5bfb4e5a0 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -12,20 +12,19 @@ import { } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { decodeFunctionData, type Abi, type Hash } from "viem"; -import { bulkInsertContractTransactionReceipts } from "../../db/contractTransactionReceipts/createContractTransactionReceipts"; -import { WebhooksEventTypes } from "../../schema/webhooks"; -import { getChain } from "../../utils/chain"; -import { logger } from "../../utils/logger"; -import { normalizeAddress } from "../../utils/primitiveTypes"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +import { bulkInsertContractTransactionReceipts } from "../../shared/db/contractTransactionReceipts/createContractTransactionReceipts"; +import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; +import { getChain } from "../../shared/utils/chain"; +import { logger } from "../../shared/utils/logger"; +import { normalizeAddress } from "../../shared/utils/primitiveTypes"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import { ProcessTransactionReceiptsQueue, type EnqueueProcessTransactionReceiptsData, } from "../queues/processTransactionReceiptsQueue"; import { logWorkerExceptions } from "../queues/queues"; import { SendWebhookQueue } from "../queues/sendWebhookQueue"; -import { getContractId } from "../utils/contractId"; import { getWebhooksByContractAddresses } from "./processEventLogsWorker"; const handler: Processor = async (job: Job) => { @@ -228,3 +227,6 @@ export const initProcessTransactionReceiptsWorker = () => { }); logWorkerExceptions(_worker); }; + +const getContractId = (chainId: number, contractAddress: string) => + `${chainId}:${contractAddress}`; diff --git a/src/worker/tasks/pruneTransactionsWorker.ts b/src/worker/tasks/pruneTransactionsWorker.ts index 9ba8a361a..d736c23f3 100644 --- a/src/worker/tasks/pruneTransactionsWorker.ts +++ b/src/worker/tasks/pruneTransactionsWorker.ts @@ -1,8 +1,8 @@ import { Worker, type Job, type Processor } from "bullmq"; -import { TransactionDB } from "../../db/transactions/db"; -import { pruneNonceMaps } from "../../db/wallets/nonceMap"; -import { env } from "../../utils/env"; -import { redis } from "../../utils/redis/redis"; +import { TransactionDB } from "../../shared/db/transactions/db"; +import { pruneNonceMaps } from "../../shared/db/wallets/nonceMap"; +import { env } from "../../shared/utils/env"; +import { redis } from "../../shared/utils/redis/redis"; import { PruneTransactionsQueue } from "../queues/pruneTransactionsQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 9dff3c4b4..e7996ad67 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -18,40 +18,40 @@ import { type UserOperation, } from "thirdweb/wallets/smart"; import { getContractAddress } from "viem"; -import { TransactionDB } from "../../db/transactions/db"; +import { TransactionDB } from "../../shared/db/transactions/db"; import { acquireNonce, addSentNonce, recycleNonce, syncLatestNonceFromOnchainIfHigher, -} from "../../db/wallets/walletNonce"; +} from "../../shared/db/wallets/walletNonce"; import { getAccount, getSmartBackendWalletAdminAccount, -} from "../../utils/account"; -import { getBlockNumberish } from "../../utils/block"; -import { getChain } from "../../utils/chain"; -import { msSince } from "../../utils/date"; -import { env } from "../../utils/env"; +} from "../../shared/utils/account"; +import { getBlockNumberish } from "../../shared/utils/block"; +import { getChain } from "../../shared/utils/chain"; +import { msSince } from "../../shared/utils/date"; +import { env } from "../../shared/utils/env"; import { isInsufficientFundsError, isNonceAlreadyUsedError, isReplacementGasFeeTooLow, wrapError, -} from "../../utils/error"; -import { BigIntMath } from "../../utils/math"; -import { getChecksumAddress } from "../../utils/primitiveTypes"; -import { recordMetrics } from "../../utils/prometheus"; -import { redis } from "../../utils/redis/redis"; -import { thirdwebClient } from "../../utils/sdk"; +} from "../../shared/utils/error"; +import { BigIntMath } from "../../shared/utils/math"; +import { getChecksumAddress } from "../../shared/utils/primitiveTypes"; +import { recordMetrics } from "../../shared/utils/prometheus"; +import { redis } from "../../shared/utils/redis/redis"; +import { thirdwebClient } from "../../shared/utils/sdk"; import type { ErroredTransaction, PopulatedTransaction, QueuedTransaction, SentTransaction, -} from "../../utils/transaction/types"; -import { enqueueTransactionWebhook } from "../../utils/transaction/webhook"; -import { reportUsage } from "../../utils/usage"; +} from "../../shared/utils/transaction/types"; +import { enqueueTransactionWebhook } from "../../shared/utils/transaction/webhook"; +import { reportUsage } from "../../shared/utils/usage"; import { MineTransactionQueue } from "../queues/mineTransactionQueue"; import { logWorkerExceptions } from "../queues/queues"; import { diff --git a/src/worker/tasks/sendWebhookWorker.ts b/src/worker/tasks/sendWebhookWorker.ts index a8cf60c23..bd62edc40 100644 --- a/src/worker/tasks/sendWebhookWorker.ts +++ b/src/worker/tasks/sendWebhookWorker.ts @@ -1,20 +1,23 @@ import type { Static } from "@sinclair/typebox"; import { Worker, type Job, type Processor } from "bullmq"; import superjson from "superjson"; -import { TransactionDB } from "../../db/transactions/db"; +import { TransactionDB } from "../../shared/db/transactions/db"; import { WebhooksEventTypes, type BackendWalletBalanceWebhookParams, -} from "../../schema/webhooks"; +} from "../../shared/schemas/webhooks"; import { toEventLogSchema } from "../../server/schemas/eventLog"; import { toTransactionSchema, type TransactionSchema, } from "../../server/schemas/transaction"; import { toTransactionReceiptSchema } from "../../server/schemas/transactionReceipt"; -import { logger } from "../../utils/logger"; -import { redis } from "../../utils/redis/redis"; -import { sendWebhookRequest, type WebhookResponse } from "../../utils/webhook"; +import { logger } from "../../shared/utils/logger"; +import { redis } from "../../shared/utils/redis/redis"; +import { + sendWebhookRequest, + type WebhookResponse, +} from "../../shared/utils/webhook"; import { SendWebhookQueue, type WebhookJob } from "../queues/sendWebhookQueue"; const handler: Processor = async (job: Job) => { diff --git a/src/worker/utils/contractId.ts b/src/worker/utils/contractId.ts deleted file mode 100644 index 6cf991fca..000000000 --- a/src/worker/utils/contractId.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const getContractId = (chainId: number, contractAddress: string) => - `${chainId}:${contractAddress}`; diff --git a/src/worker/utils/nonce.ts b/src/worker/utils/nonce.ts deleted file mode 100644 index d225ae87b..000000000 --- a/src/worker/utils/nonce.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { BigNumber } from "ethers"; -import { concat, toHex } from "viem"; - -const generateRandomUint192 = (): bigint => { - const rand1 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand2 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand3 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand4 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand5 = BigInt(Math.floor(Math.random() * 0x100000000)); - const rand6 = BigInt(Math.floor(Math.random() * 0x100000000)); - return ( - (rand1 << 160n) | - (rand2 << 128n) | - (rand3 << 96n) | - (rand4 << 64n) | - (rand5 << 32n) | - rand6 - ); -}; - -export const randomNonce = () => { - return BigNumber.from( - concat([toHex(generateRandomUint192()), "0x0000000000000000"]), - ); -}; diff --git a/test/e2e/.env.test.example b/tests/e2e/.env.test.example similarity index 100% rename from test/e2e/.env.test.example rename to tests/e2e/.env.test.example diff --git a/test/e2e/.gitignore b/tests/e2e/.gitignore similarity index 100% rename from test/e2e/.gitignore rename to tests/e2e/.gitignore diff --git a/test/e2e/README.md b/tests/e2e/README.md similarity index 100% rename from test/e2e/README.md rename to tests/e2e/README.md diff --git a/test/e2e/bun.lockb b/tests/e2e/bun.lockb similarity index 100% rename from test/e2e/bun.lockb rename to tests/e2e/bun.lockb diff --git a/test/e2e/config.ts b/tests/e2e/config.ts similarity index 100% rename from test/e2e/config.ts rename to tests/e2e/config.ts diff --git a/test/e2e/package.json b/tests/e2e/package.json similarity index 100% rename from test/e2e/package.json rename to tests/e2e/package.json diff --git a/test/e2e/scripts/counter.ts b/tests/e2e/scripts/counter.ts similarity index 90% rename from test/e2e/scripts/counter.ts rename to tests/e2e/scripts/counter.ts index ccb9bd8de..b0c40f50e 100644 --- a/test/e2e/scripts/counter.ts +++ b/tests/e2e/scripts/counter.ts @@ -2,8 +2,8 @@ // You can save the output to a file and then use this script to count the number of times a specific RPC call is made. import { argv } from "bun"; -import { readFile } from "fs/promises"; -import { join } from "path"; +import { readFile } from "node:fs/promises"; +import { join } from "node:path"; const file = join(__dirname, argv[2]); diff --git a/test/e2e/tests/extensions.test.ts b/tests/e2e/tests/extensions.test.ts similarity index 98% rename from test/e2e/tests/extensions.test.ts rename to tests/e2e/tests/extensions.test.ts index 1126f2877..ed0674da8 100644 --- a/test/e2e/tests/extensions.test.ts +++ b/tests/e2e/tests/extensions.test.ts @@ -1,4 +1,4 @@ -import assert from "assert"; +import assert from "node:assert"; import { sleep } from "bun"; import { beforeAll, describe, expect, test } from "bun:test"; import { getAddress, type Address } from "viem"; diff --git a/test/e2e/tests/load.test.ts b/tests/e2e/tests/load.test.ts similarity index 98% rename from test/e2e/tests/load.test.ts rename to tests/e2e/tests/load.test.ts index 1e31a2e4b..0cdea6317 100644 --- a/test/e2e/tests/load.test.ts +++ b/tests/e2e/tests/load.test.ts @@ -1,4 +1,4 @@ -import assert from "assert"; +import assert from "node:assert"; import { sleep } from "bun"; import { describe, expect, test } from "bun:test"; import { getAddress } from "viem"; diff --git a/test/e2e/tests/read.test.ts b/tests/e2e/tests/read.test.ts similarity index 99% rename from test/e2e/tests/read.test.ts rename to tests/e2e/tests/read.test.ts index 7be048956..25acbc951 100644 --- a/test/e2e/tests/read.test.ts +++ b/tests/e2e/tests/read.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import { sepolia } from "thirdweb/chains"; -import type { ApiError } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; +import type { ApiError } from "../../../sdk/dist/thirdweb-dev-engine.cjs.js"; import type { setupEngine } from "../utils/engine"; import { setup } from "./setup"; diff --git a/test/e2e/tests/routes/erc1155-transfer.test.ts b/tests/e2e/tests/routes/erc1155-transfer.test.ts similarity index 100% rename from test/e2e/tests/routes/erc1155-transfer.test.ts rename to tests/e2e/tests/routes/erc1155-transfer.test.ts diff --git a/test/e2e/tests/routes/erc20-transfer.test.ts b/tests/e2e/tests/routes/erc20-transfer.test.ts similarity index 99% rename from test/e2e/tests/routes/erc20-transfer.test.ts rename to tests/e2e/tests/routes/erc20-transfer.test.ts index 7a22c149e..867e1d43b 100644 --- a/test/e2e/tests/routes/erc20-transfer.test.ts +++ b/tests/e2e/tests/routes/erc20-transfer.test.ts @@ -4,7 +4,7 @@ import { ZERO_ADDRESS, toWei, type Address } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; -import { setup } from "./../setup"; +import { setup } from "../setup"; describe("ERC20 transfer", () => { let tokenContractAddress: string; diff --git a/test/e2e/tests/routes/erc721-transfer.test.ts b/tests/e2e/tests/routes/erc721-transfer.test.ts similarity index 100% rename from test/e2e/tests/routes/erc721-transfer.test.ts rename to tests/e2e/tests/routes/erc721-transfer.test.ts diff --git a/test/e2e/tests/routes/signMessage.test.ts b/tests/e2e/tests/routes/signMessage.test.ts similarity index 100% rename from test/e2e/tests/routes/signMessage.test.ts rename to tests/e2e/tests/routes/signMessage.test.ts diff --git a/test/e2e/tests/routes/signaturePrepare.test.ts b/tests/e2e/tests/routes/signaturePrepare.test.ts similarity index 100% rename from test/e2e/tests/routes/signaturePrepare.test.ts rename to tests/e2e/tests/routes/signaturePrepare.test.ts diff --git a/test/e2e/tests/routes/write.test.ts b/tests/e2e/tests/routes/write.test.ts similarity index 97% rename from test/e2e/tests/routes/write.test.ts rename to tests/e2e/tests/routes/write.test.ts index d891055d6..68e9db9de 100644 --- a/test/e2e/tests/routes/write.test.ts +++ b/tests/e2e/tests/routes/write.test.ts @@ -3,10 +3,10 @@ import assert from "node:assert"; import { stringToHex, type Address } from "thirdweb"; import { zeroAddress } from "viem"; import type { ApiError } from "../../../../sdk/dist/thirdweb-dev-engine.cjs.js"; -import { CONFIG } from "../../config"; -import type { setupEngine } from "../../utils/engine"; -import { pollTransactionStatus } from "../../utils/transactions"; -import { setup } from "../setup"; +import { CONFIG } from "../../config.js"; +import type { setupEngine } from "../../utils/engine.js"; +import { pollTransactionStatus } from "../../utils/transactions.js"; +import { setup } from "../setup.js"; describe("/contract/write route", () => { let tokenContractAddress: string; diff --git a/test/e2e/tests/setup.ts b/tests/e2e/tests/setup.ts similarity index 96% rename from test/e2e/tests/setup.ts rename to tests/e2e/tests/setup.ts index c65b07e06..0be24b7f7 100644 --- a/test/e2e/tests/setup.ts +++ b/tests/e2e/tests/setup.ts @@ -25,7 +25,7 @@ export const setup = async (): Promise => { const engine = setupEngine(); const backendWallet = await getEngineBackendWallet(engine); - await engine.backendWallet.resetNonces(); + await engine.backendWallet.resetNonces({}); if (!env.THIRDWEB_API_SECRET_KEY) throw new Error("THIRDWEB_API_SECRET_KEY is not set"); diff --git a/test/e2e/tests/sign-transaction.test.ts b/tests/e2e/tests/sign-transaction.test.ts similarity index 100% rename from test/e2e/tests/sign-transaction.test.ts rename to tests/e2e/tests/sign-transaction.test.ts diff --git a/test/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts b/tests/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts similarity index 100% rename from test/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts rename to tests/e2e/tests/smart-backend-wallet/smart-aws-wallet.test.ts diff --git a/test/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts b/tests/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts similarity index 100% rename from test/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts rename to tests/e2e/tests/smart-backend-wallet/smart-gcp-wallet.test.ts diff --git a/test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts b/tests/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts similarity index 100% rename from test/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts rename to tests/e2e/tests/smart-backend-wallet/smart-local-wallet-sdk-v4.test.ts diff --git a/test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts b/tests/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts similarity index 100% rename from test/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts rename to tests/e2e/tests/smart-backend-wallet/smart-local-wallet.test.ts diff --git a/test/e2e/tests/smoke.test.ts b/tests/e2e/tests/smoke.test.ts similarity index 100% rename from test/e2e/tests/smoke.test.ts rename to tests/e2e/tests/smoke.test.ts diff --git a/test/e2e/tests/userop.test.ts b/tests/e2e/tests/userop.test.ts similarity index 98% rename from test/e2e/tests/userop.test.ts rename to tests/e2e/tests/userop.test.ts index 18c5cba6d..875231e67 100644 --- a/test/e2e/tests/userop.test.ts +++ b/tests/e2e/tests/userop.test.ts @@ -1,5 +1,5 @@ import { beforeAll, describe, expect, test } from "bun:test"; -import { randomBytes } from "crypto"; +import { randomBytes } from "node:crypto"; import { getAddress, type Address } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { DEFAULT_ACCOUNT_FACTORY_V0_6 } from "thirdweb/wallets/smart"; diff --git a/test/e2e/tests/utils/getBlockTime.test.ts b/tests/e2e/tests/utils/getBlockTime.test.ts similarity index 100% rename from test/e2e/tests/utils/getBlockTime.test.ts rename to tests/e2e/tests/utils/getBlockTime.test.ts diff --git a/test/e2e/tsconfig.json b/tests/e2e/tsconfig.json similarity index 100% rename from test/e2e/tsconfig.json rename to tests/e2e/tsconfig.json diff --git a/test/e2e/utils/anvil.ts b/tests/e2e/utils/anvil.ts similarity index 100% rename from test/e2e/utils/anvil.ts rename to tests/e2e/utils/anvil.ts diff --git a/test/e2e/utils/engine.ts b/tests/e2e/utils/engine.ts similarity index 95% rename from test/e2e/utils/engine.ts rename to tests/e2e/utils/engine.ts index 53cb57be0..b4bdede4f 100644 --- a/test/e2e/utils/engine.ts +++ b/tests/e2e/utils/engine.ts @@ -1,5 +1,5 @@ import { checksumAddress } from "thirdweb/utils"; -import { Engine } from "../../../sdk"; +import { Engine } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; import { CONFIG } from "../config"; import { ANVIL_PKEY_A, ANVIL_PKEY_B } from "./wallets"; diff --git a/test/e2e/utils/statistics.ts b/tests/e2e/utils/statistics.ts similarity index 100% rename from test/e2e/utils/statistics.ts rename to tests/e2e/utils/statistics.ts diff --git a/test/e2e/utils/transactions.ts b/tests/e2e/utils/transactions.ts similarity index 95% rename from test/e2e/utils/transactions.ts rename to tests/e2e/utils/transactions.ts index 7e51b5a6c..4f889d3a9 100644 --- a/test/e2e/utils/transactions.ts +++ b/tests/e2e/utils/transactions.ts @@ -1,6 +1,6 @@ import { sleep } from "bun"; -import { type Address } from "viem"; -import { Engine } from "../../../sdk"; +import type { Address } from "viem"; +import type { Engine } from "../../../sdk/dist/thirdweb-dev-engine.cjs"; import { CONFIG } from "../config"; type Timing = { diff --git a/test/e2e/utils/wallets.ts b/tests/e2e/utils/wallets.ts similarity index 100% rename from test/e2e/utils/wallets.ts rename to tests/e2e/utils/wallets.ts diff --git a/src/tests/config/aws-kms.ts b/tests/shared/aws-kms.ts similarity index 100% rename from src/tests/config/aws-kms.ts rename to tests/shared/aws-kms.ts diff --git a/src/tests/shared/chain.ts b/tests/shared/chain.ts similarity index 100% rename from src/tests/shared/chain.ts rename to tests/shared/chain.ts diff --git a/src/tests/shared/client.ts b/tests/shared/client.ts similarity index 100% rename from src/tests/shared/client.ts rename to tests/shared/client.ts diff --git a/src/tests/config/gcp-kms.ts b/tests/shared/gcp-kms.ts similarity index 100% rename from src/tests/config/gcp-kms.ts rename to tests/shared/gcp-kms.ts diff --git a/src/tests/shared/typed-data.ts b/tests/shared/typed-data.ts similarity index 100% rename from src/tests/shared/typed-data.ts rename to tests/shared/typed-data.ts diff --git a/src/tests/auth.test.ts b/tests/unit/auth.test.ts similarity index 96% rename from src/tests/auth.test.ts rename to tests/unit/auth.test.ts index 8e6e774e9..7ea7ab5f2 100644 --- a/src/tests/auth.test.ts +++ b/tests/unit/auth.test.ts @@ -1,19 +1,22 @@ import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { LocalWallet } from "@thirdweb-dev/wallets"; -import { FastifyRequest } from "fastify/types/request"; +import type { FastifyRequest } from "fastify/types/request"; import jsonwebtoken from "jsonwebtoken"; -import { getPermissions } from "../db/permissions/getPermissions"; -import { WebhooksEventTypes } from "../schema/webhooks"; -import { onRequest } from "../server/middleware/auth"; -import { Permission } from "../server/schemas/auth"; -import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../utils/auth"; -import { getAccessToken } from "../utils/cache/accessToken"; -import { getAuthWallet } from "../utils/cache/authWallet"; -import { getConfig } from "../utils/cache/getConfig"; -import { getWebhooksByEventType } from "../utils/cache/getWebhook"; -import { getKeypair } from "../utils/cache/keypair"; -import { sendWebhookRequest } from "../utils/webhook"; +import { getPermissions } from "../../src/shared/db/permissions/getPermissions"; +import { WebhooksEventTypes } from "../../src/shared/schemas/webhooks"; +import { onRequest } from "../../src/server/middleware/auth"; +import { + THIRDWEB_DASHBOARD_ISSUER, + handleSiwe, +} from "../../src/shared/utils/auth"; +import { getAccessToken } from "../../src/shared/utils/cache/accessToken"; +import { getAuthWallet } from "../../src/shared/utils/cache/authWallet"; +import { getConfig } from "../../src/shared/utils/cache/getConfig"; +import { getWebhooksByEventType } from "../../src/shared/utils/cache/getWebhook"; +import { getKeypair } from "../../src/shared/utils/cache/keypair"; +import { sendWebhookRequest } from "../../src/shared/utils/webhook"; +import { Permission } from "../../src/shared/schemas"; vi.mock("../utils/cache/accessToken"); const mockGetAccessToken = vi.mocked(getAccessToken); diff --git a/src/tests/aws-arn.test.ts b/tests/unit/aws-arn.test.ts similarity index 97% rename from src/tests/aws-arn.test.ts rename to tests/unit/aws-arn.test.ts index cc885a4a9..8b46025f3 100644 --- a/src/tests/aws-arn.test.ts +++ b/tests/unit/aws-arn.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { getAwsKmsArn, splitAwsKmsArn, -} from "../server/utils/wallets/awsKmsArn"; +} from "../../src/server/utils/wallets/awsKmsArn"; describe("splitAwsKmsArn", () => { it("should correctly split a valid AWS KMS ARN", () => { diff --git a/src/tests/wallets/aws-kms.test.ts b/tests/unit/aws-kms.test.ts similarity index 95% rename from src/tests/wallets/aws-kms.test.ts rename to tests/unit/aws-kms.test.ts index 4d0b7a129..b02c4e28a 100644 --- a/src/tests/wallets/aws-kms.test.ts +++ b/tests/unit/aws-kms.test.ts @@ -1,11 +1,7 @@ import { beforeAll, expect, test, vi } from "vitest"; import { ANVIL_CHAIN, anvilTestClient } from "../shared/chain.ts"; - -import { TEST_AWS_KMS_CONFIG } from "../config/aws-kms.ts"; - import { typedData } from "../shared/typed-data.ts"; - import { verifyTypedData } from "thirdweb"; import { verifyEOASignature } from "thirdweb/auth"; import { @@ -14,8 +10,9 @@ import { } from "thirdweb/transaction"; import { toUnits, toWei } from "thirdweb/utils"; import { getWalletBalance } from "thirdweb/wallets"; -import { getAwsKmsAccount } from "../../server/utils/wallets/getAwsKmsAccount.js"; import { TEST_CLIENT } from "../shared/client.ts"; +import { getAwsKmsAccount } from "../../src/server/utils/wallets/getAwsKmsAccount"; +import { TEST_AWS_KMS_CONFIG } from "../shared/aws-kms.ts"; let account: Awaited>; diff --git a/src/tests/chain.test.ts b/tests/unit/chain.test.ts similarity index 96% rename from src/tests/chain.test.ts rename to tests/unit/chain.test.ts index 4a3684a6c..dff36db94 100644 --- a/src/tests/chain.test.ts +++ b/tests/unit/chain.test.ts @@ -3,8 +3,8 @@ import { getChainBySlugAsync, } from "@thirdweb-dev/chains"; import { beforeEach, describe, expect, it, vi } from "vitest"; -import { getChainIdFromChain } from "../server/utils/chain"; -import { getConfig } from "../utils/cache/getConfig"; +import { getChainIdFromChain } from "../../src/server/utils/chain"; +import { getConfig } from "../../src/shared/utils/cache/getConfig"; // Mock the external dependencies vi.mock("../utils/cache/getConfig"); diff --git a/src/tests/wallets/gcp-kms.test.ts b/tests/unit/gcp-kms.test.ts similarity index 94% rename from src/tests/wallets/gcp-kms.test.ts rename to tests/unit/gcp-kms.test.ts index afc4feffb..1f2d183cc 100644 --- a/src/tests/wallets/gcp-kms.test.ts +++ b/tests/unit/gcp-kms.test.ts @@ -1,9 +1,7 @@ import { beforeAll, expect, test, vi } from "vitest"; import { ANVIL_CHAIN, anvilTestClient } from "../shared/chain.ts"; - import { typedData } from "../shared/typed-data.ts"; - import { verifyTypedData } from "thirdweb"; import { verifyEOASignature } from "thirdweb/auth"; import { @@ -12,9 +10,9 @@ import { } from "thirdweb/transaction"; import { toUnits, toWei } from "thirdweb/utils"; import { getWalletBalance } from "thirdweb/wallets"; -import { getGcpKmsAccount } from "../../server/utils/wallets/getGcpKmsAccount.ts"; -import { TEST_GCP_KMS_CONFIG } from "../config/gcp-kms.ts"; -import { TEST_CLIENT } from "../shared/client.ts"; +import { getGcpKmsAccount } from "../../src/server/utils/wallets/getGcpKmsAccount"; +import { TEST_GCP_KMS_CONFIG } from "../shared/gcp-kms"; +import { TEST_CLIENT } from "../shared/client"; let account: Awaited>; diff --git a/src/tests/gcp-resource-path.test.ts b/tests/unit/gcp-resource-path.test.ts similarity index 97% rename from src/tests/gcp-resource-path.test.ts rename to tests/unit/gcp-resource-path.test.ts index ae6da618f..52a497d2a 100644 --- a/src/tests/gcp-resource-path.test.ts +++ b/tests/unit/gcp-resource-path.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { getGcpKmsResourcePath, splitGcpKmsResourcePath, -} from "../server/utils/wallets/gcpKmsResourcePath"; +} from "../../src/server/utils/wallets/gcpKmsResourcePath"; describe("splitGcpKmsResourcePath", () => { it("should correctly split a valid GCP KMS resource path", () => { diff --git a/src/tests/math.test.ts b/tests/unit/math.test.ts similarity index 78% rename from src/tests/math.test.ts rename to tests/unit/math.test.ts index 7fe88c307..3a27e56f7 100644 --- a/src/tests/math.test.ts +++ b/tests/unit/math.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { bigMath, getPercentile } from "../utils/math"; +import { BigIntMath, getPercentile } from "../../src/shared/utils/math"; describe("getPercentile", () => { it("should correctly calculate the p50 (median) of a sorted array", () => { @@ -28,42 +28,42 @@ describe("getPercentile", () => { }); }); -describe("bigMath", () => { +describe("BigIntMath", () => { describe("min", () => { it("should return the smaller of two positive numbers", () => { const a = 5n; const b = 10n; - expect(bigMath.min(a, b)).toBe(5n); + expect(BigIntMath.min(a, b)).toBe(5n); }); it("should return the smaller of two negative numbers", () => { const a = -10n; const b = -5n; - expect(bigMath.min(a, b)).toBe(-10n); + expect(BigIntMath.min(a, b)).toBe(-10n); }); it("should handle equal numbers", () => { const a = 5n; const b = 5n; - expect(bigMath.min(a, b)).toBe(5n); + expect(BigIntMath.min(a, b)).toBe(5n); }); it("should handle zero and positive number", () => { const a = 0n; const b = 5n; - expect(bigMath.min(a, b)).toBe(0n); + expect(BigIntMath.min(a, b)).toBe(0n); }); it("should handle zero and negative number", () => { const a = 0n; const b = -5n; - expect(bigMath.min(a, b)).toBe(-5n); + expect(BigIntMath.min(a, b)).toBe(-5n); }); it("should handle very large numbers", () => { const a = BigInt(Number.MAX_SAFE_INTEGER) * 2n; const b = BigInt(Number.MAX_SAFE_INTEGER); - expect(bigMath.min(a, b)).toBe(b); + expect(BigIntMath.min(a, b)).toBe(b); }); }); @@ -71,37 +71,37 @@ describe("bigMath", () => { it("should return the larger of two positive numbers", () => { const a = 5n; const b = 10n; - expect(bigMath.max(a, b)).toBe(10n); + expect(BigIntMath.max(a, b)).toBe(10n); }); it("should return the larger of two negative numbers", () => { const a = -10n; const b = -5n; - expect(bigMath.max(a, b)).toBe(-5n); + expect(BigIntMath.max(a, b)).toBe(-5n); }); it("should handle equal numbers", () => { const a = 5n; const b = 5n; - expect(bigMath.max(a, b)).toBe(5n); + expect(BigIntMath.max(a, b)).toBe(5n); }); it("should handle zero and positive number", () => { const a = 0n; const b = 5n; - expect(bigMath.max(a, b)).toBe(5n); + expect(BigIntMath.max(a, b)).toBe(5n); }); it("should handle zero and negative number", () => { const a = 0n; const b = -5n; - expect(bigMath.max(a, b)).toBe(0n); + expect(BigIntMath.max(a, b)).toBe(0n); }); it("should handle very large numbers", () => { const a = BigInt(Number.MAX_SAFE_INTEGER) * 2n; const b = BigInt(Number.MAX_SAFE_INTEGER); - expect(bigMath.max(a, b)).toBe(a); + expect(BigIntMath.max(a, b)).toBe(a); }); }); }); diff --git a/src/tests/schema.test.ts b/tests/unit/schema.test.ts similarity index 97% rename from src/tests/schema.test.ts rename to tests/unit/schema.test.ts index 17f4b167a..c1de80d36 100644 --- a/src/tests/schema.test.ts +++ b/tests/unit/schema.test.ts @@ -4,8 +4,8 @@ import { AddressSchema, HexSchema, TransactionHashSchema, -} from "../server/schemas/address"; -import { chainIdOrSlugSchema } from "../server/schemas/chain"; +} from "../../src/server/schemas/address"; +import { chainIdOrSlugSchema } from "../../src/server/schemas/chain"; // Test cases describe("chainIdOrSlugSchema", () => { diff --git a/src/tests/sendTransactionWorker.test.ts b/tests/unit/sendTransactionWorker.test.ts similarity index 100% rename from src/tests/sendTransactionWorker.test.ts rename to tests/unit/sendTransactionWorker.test.ts diff --git a/src/tests/swr.test.ts b/tests/unit/swr.test.ts similarity index 98% rename from src/tests/swr.test.ts rename to tests/unit/swr.test.ts index ce709ddf3..33fb485ef 100644 --- a/src/tests/swr.test.ts +++ b/tests/unit/swr.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; -import { createSWRCache, type SWRCache } from "../lib/cache/swr"; +import { createSWRCache, type SWRCache } from "../../src/shared/lib/cache/swr"; describe("SWRCache", () => { let cache: SWRCache; diff --git a/src/tests/validator.test.ts b/tests/unit/validator.test.ts similarity index 94% rename from src/tests/validator.test.ts rename to tests/unit/validator.test.ts index 31304c01d..f15612258 100644 --- a/src/tests/validator.test.ts +++ b/tests/unit/validator.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { isValidWebhookUrl } from "../server/utils/validator"; +import { isValidWebhookUrl } from "../../src/server/utils/validator"; describe("isValidWebhookUrl", () => { it("should return true for a valid HTTPS URL", () => { diff --git a/tsconfig.json b/tsconfig.json index e708959bb..6fb9b351a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,5 +25,5 @@ "src/**/*.js", "src/**/*.d.ts" ], - "exclude": ["node_modules", "src/tests/**/*.ts"] + "exclude": ["node_modules", "tests/tests/**/*.ts"] } diff --git a/vitest.config.ts b/vitest.config.ts index cfcdaf467..d2f6a0cda 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,9 +2,8 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { - include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], + include: ["tests/unit/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], exclude: ["tests/e2e/**/*"], - // setupFiles: ["./vitest.setup.ts"], globalSetup: ["./vitest.global-setup.ts"], mockReset: true, }, diff --git a/vitest.global-setup.ts b/vitest.global-setup.ts index 53f215c91..c09752690 100644 --- a/vitest.global-setup.ts +++ b/vitest.global-setup.ts @@ -5,17 +5,19 @@ config({ path: [path.resolve(".env.test.local"), path.resolve(".env.test")], }); -import { createServer } from "prool"; -import { anvil } from "prool/instances"; +// import { createServer } from "prool"; +// import { anvil } from "prool/instances"; -export async function setup() { - const server = createServer({ - instance: anvil(), - port: 8645, // Choose an appropriate port - }); - await server.start(); - // Return a teardown function that will be called after all tests are complete - return async () => { - await server.stop(); - }; -} +// export async function setup() { +// const server = createServer({ +// instance: anvil(), +// port: 8645, // Choose an appropriate port +// }); +// await server.start(); +// // Return a teardown function that will be called after all tests are complete +// return async () => { +// await server.stop(); +// }; +// } + +export async function setup() {} From 07c14935f55de67bca5eba53bdb09a5057c297d7 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 13:42:55 +0800 Subject: [PATCH 34/44] chore: Dedupe transaction hashes on resend (#802) --- src/worker/tasks/sendTransactionWorker.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index e7996ad67..6a340b691 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -472,7 +472,10 @@ const _resendTransaction = async ( resendCount, sentAt: new Date(), sentAtBlock: await getBlockNumberish(chainId), - sentTransactionHashes: [...sentTransactionHashes, transactionHash], + // Dedupe transaction hashes. + sentTransactionHashes: [ + ...new Set([...sentTransactionHashes, transactionHash]), + ], gas: populatedTransaction.gas, gasPrice: populatedTransaction.gasPrice, maxFeePerGas: populatedTransaction.maxFeePerGas, From cd7ad6c9d13de2a1014f468732d73e2fc020f1be Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 16:25:28 +0800 Subject: [PATCH 35/44] chore(refactor): kebab-case /shared folder (#803) * chore(refactor): kebab-case /shared/db * all shared folder --- renamer.ts | 145 ++++++++++++++++++ src/server/index.ts | 2 +- src/server/middleware/auth.ts | 14 +- src/server/middleware/cors.ts | 2 +- src/server/routes/admin/nonces.ts | 2 +- src/server/routes/admin/transaction.ts | 4 +- .../routes/auth/access-tokens/create.ts | 8 +- .../routes/auth/access-tokens/getAll.ts | 2 +- .../routes/auth/access-tokens/revoke.ts | 4 +- .../routes/auth/access-tokens/update.ts | 4 +- src/server/routes/auth/permissions/grant.ts | 2 +- src/server/routes/auth/permissions/revoke.ts | 2 +- .../routes/backend-wallet/cancel-nonces.ts | 2 +- src/server/routes/backend-wallet/create.ts | 2 +- src/server/routes/backend-wallet/getAll.ts | 2 +- .../routes/backend-wallet/getBalance.ts | 2 +- src/server/routes/backend-wallet/getNonce.ts | 2 +- .../backend-wallet/getTransactionsByNonce.ts | 4 +- src/server/routes/backend-wallet/import.ts | 2 +- src/server/routes/backend-wallet/remove.ts | 2 +- .../routes/backend-wallet/reset-nonces.ts | 2 +- .../routes/backend-wallet/sendTransaction.ts | 2 +- .../backend-wallet/sendTransactionBatch.ts | 2 +- .../routes/backend-wallet/signMessage.ts | 2 +- .../routes/backend-wallet/signTransaction.ts | 2 +- .../routes/backend-wallet/signTypedData.ts | 2 +- .../backend-wallet/simulateTransaction.ts | 2 +- src/server/routes/backend-wallet/transfer.ts | 4 +- src/server/routes/backend-wallet/update.ts | 2 +- src/server/routes/backend-wallet/withdraw.ts | 2 +- src/server/routes/chain/getAll.ts | 2 +- src/server/routes/configuration/auth/get.ts | 2 +- .../routes/configuration/auth/update.ts | 4 +- .../backend-wallet-balance/get.ts | 2 +- .../backend-wallet-balance/update.ts | 4 +- src/server/routes/configuration/cache/get.ts | 2 +- .../routes/configuration/cache/update.ts | 8 +- src/server/routes/configuration/chains/get.ts | 2 +- .../routes/configuration/chains/update.ts | 6 +- .../contract-subscriptions/get.ts | 2 +- .../contract-subscriptions/update.ts | 4 +- src/server/routes/configuration/cors/add.ts | 4 +- src/server/routes/configuration/cors/get.ts | 2 +- .../routes/configuration/cors/remove.ts | 4 +- src/server/routes/configuration/cors/set.ts | 4 +- src/server/routes/configuration/ip/get.ts | 2 +- src/server/routes/configuration/ip/set.ts | 4 +- .../routes/configuration/transactions/get.ts | 2 +- .../configuration/transactions/update.ts | 4 +- .../routes/configuration/wallets/get.ts | 2 +- .../routes/configuration/wallets/update.ts | 4 +- .../routes/contract/events/getAllEvents.ts | 2 +- .../contract/events/getContractEventLogs.ts | 4 +- .../events/getEventLogsByTimestamp.ts | 2 +- .../routes/contract/events/getEvents.ts | 2 +- .../contract/events/paginateEventLogs.ts | 4 +- .../extensions/account/read/getAllAdmins.ts | 2 +- .../extensions/account/read/getAllSessions.ts | 2 +- .../extensions/account/write/grantAdmin.ts | 4 +- .../extensions/account/write/grantSession.ts | 4 +- .../extensions/account/write/revokeAdmin.ts | 4 +- .../extensions/account/write/revokeSession.ts | 4 +- .../extensions/account/write/updateSession.ts | 4 +- .../accountFactory/read/getAllAccounts.ts | 2 +- .../read/getAssociatedAccounts.ts | 2 +- .../accountFactory/read/isAccountDeployed.ts | 2 +- .../read/predictAccountAddress.ts | 2 +- .../accountFactory/write/createAccount.ts | 4 +- .../extensions/erc1155/read/balanceOf.ts | 2 +- .../extensions/erc1155/read/canClaim.ts | 2 +- .../contract/extensions/erc1155/read/get.ts | 2 +- .../erc1155/read/getActiveClaimConditions.ts | 2 +- .../extensions/erc1155/read/getAll.ts | 2 +- .../erc1155/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc1155/read/getClaimerProofs.ts | 2 +- .../extensions/erc1155/read/getOwned.ts | 2 +- .../extensions/erc1155/read/isApproved.ts | 2 +- .../erc1155/read/signatureGenerate.ts | 4 +- .../extensions/erc1155/read/totalCount.ts | 2 +- .../extensions/erc1155/read/totalSupply.ts | 2 +- .../extensions/erc1155/write/airdrop.ts | 4 +- .../contract/extensions/erc1155/write/burn.ts | 4 +- .../extensions/erc1155/write/burnBatch.ts | 4 +- .../extensions/erc1155/write/claimTo.ts | 4 +- .../extensions/erc1155/write/lazyMint.ts | 4 +- .../erc1155/write/mintAdditionalSupplyTo.ts | 4 +- .../extensions/erc1155/write/mintBatchTo.ts | 4 +- .../extensions/erc1155/write/mintTo.ts | 2 +- .../erc1155/write/setApprovalForAll.ts | 4 +- .../erc1155/write/setBatchClaimConditions.ts | 4 +- .../erc1155/write/setClaimConditions.ts | 4 +- .../extensions/erc1155/write/signatureMint.ts | 4 +- .../extensions/erc1155/write/transfer.ts | 4 +- .../extensions/erc1155/write/transferFrom.ts | 4 +- .../erc1155/write/updateClaimConditions.ts | 4 +- .../erc1155/write/updateTokenMetadata.ts | 4 +- .../extensions/erc20/read/allowanceOf.ts | 2 +- .../extensions/erc20/read/balanceOf.ts | 2 +- .../extensions/erc20/read/canClaim.ts | 2 +- .../contract/extensions/erc20/read/get.ts | 2 +- .../erc20/read/getActiveClaimConditions.ts | 2 +- .../erc20/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../extensions/erc20/read/getClaimerProofs.ts | 2 +- .../erc20/read/signatureGenerate.ts | 4 +- .../extensions/erc20/read/totalSupply.ts | 2 +- .../contract/extensions/erc20/write/burn.ts | 4 +- .../extensions/erc20/write/burnFrom.ts | 4 +- .../extensions/erc20/write/claimTo.ts | 4 +- .../extensions/erc20/write/mintBatchTo.ts | 4 +- .../contract/extensions/erc20/write/mintTo.ts | 2 +- .../extensions/erc20/write/setAllowance.ts | 4 +- .../erc20/write/setClaimConditions.ts | 4 +- .../extensions/erc20/write/signatureMint.ts | 4 +- .../extensions/erc20/write/transfer.ts | 4 +- .../extensions/erc20/write/transferFrom.ts | 4 +- .../erc20/write/updateClaimConditions.ts | 4 +- .../extensions/erc721/read/balanceOf.ts | 2 +- .../extensions/erc721/read/canClaim.ts | 2 +- .../contract/extensions/erc721/read/get.ts | 2 +- .../erc721/read/getActiveClaimConditions.ts | 2 +- .../contract/extensions/erc721/read/getAll.ts | 2 +- .../erc721/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc721/read/getClaimerProofs.ts | 2 +- .../extensions/erc721/read/getOwned.ts | 2 +- .../extensions/erc721/read/isApproved.ts | 2 +- .../erc721/read/signatureGenerate.ts | 4 +- .../erc721/read/totalClaimedSupply.ts | 2 +- .../extensions/erc721/read/totalCount.ts | 2 +- .../erc721/read/totalUnclaimedSupply.ts | 2 +- .../contract/extensions/erc721/write/burn.ts | 4 +- .../extensions/erc721/write/claimTo.ts | 4 +- .../extensions/erc721/write/lazyMint.ts | 4 +- .../extensions/erc721/write/mintBatchTo.ts | 4 +- .../extensions/erc721/write/mintTo.ts | 2 +- .../erc721/write/setApprovalForAll.ts | 4 +- .../erc721/write/setApprovalForToken.ts | 4 +- .../erc721/write/setClaimConditions.ts | 4 +- .../extensions/erc721/write/signatureMint.ts | 8 +- .../extensions/erc721/write/transfer.ts | 4 +- .../extensions/erc721/write/transferFrom.ts | 4 +- .../erc721/write/updateClaimConditions.ts | 4 +- .../erc721/write/updateTokenMetadata.ts | 4 +- .../directListings/read/getAll.ts | 2 +- .../directListings/read/getAllValid.ts | 2 +- .../directListings/read/getListing.ts | 2 +- .../directListings/read/getTotalCount.ts | 2 +- .../read/isBuyerApprovedForListing.ts | 2 +- .../read/isCurrencyApprovedForListing.ts | 2 +- .../write/approveBuyerForReservedListing.ts | 4 +- .../directListings/write/buyFromListing.ts | 4 +- .../directListings/write/cancelListing.ts | 4 +- .../directListings/write/createListing.ts | 4 +- .../revokeBuyerApprovalForReservedListing.ts | 4 +- .../write/revokeCurrencyApprovalForListing.ts | 4 +- .../directListings/write/updateListing.ts | 4 +- .../englishAuctions/read/getAll.ts | 2 +- .../englishAuctions/read/getAllValid.ts | 2 +- .../englishAuctions/read/getAuction.ts | 2 +- .../englishAuctions/read/getBidBufferBps.ts | 2 +- .../englishAuctions/read/getMinimumNextBid.ts | 2 +- .../englishAuctions/read/getTotalCount.ts | 2 +- .../englishAuctions/read/getWinner.ts | 2 +- .../englishAuctions/read/getWinningBid.ts | 2 +- .../englishAuctions/read/isWinningBid.ts | 2 +- .../englishAuctions/write/buyoutAuction.ts | 4 +- .../englishAuctions/write/cancelAuction.ts | 4 +- .../write/closeAuctionForBidder.ts | 4 +- .../write/closeAuctionForSeller.ts | 4 +- .../englishAuctions/write/createAuction.ts | 4 +- .../englishAuctions/write/executeSale.ts | 4 +- .../englishAuctions/write/makeBid.ts | 4 +- .../marketplaceV3/offers/read/getAll.ts | 2 +- .../marketplaceV3/offers/read/getAllValid.ts | 2 +- .../marketplaceV3/offers/read/getOffer.ts | 2 +- .../offers/read/getTotalCount.ts | 2 +- .../marketplaceV3/offers/write/acceptOffer.ts | 4 +- .../marketplaceV3/offers/write/cancelOffer.ts | 4 +- .../marketplaceV3/offers/write/makeOffer.ts | 4 +- src/server/routes/contract/metadata/abi.ts | 2 +- src/server/routes/contract/metadata/events.ts | 2 +- .../routes/contract/metadata/extensions.ts | 2 +- .../routes/contract/metadata/functions.ts | 2 +- src/server/routes/contract/read/read.ts | 2 +- src/server/routes/contract/roles/read/get.ts | 2 +- .../routes/contract/roles/read/getAll.ts | 2 +- .../routes/contract/roles/write/grant.ts | 4 +- .../routes/contract/roles/write/revoke.ts | 4 +- .../royalties/read/getDefaultRoyaltyInfo.ts | 2 +- .../royalties/read/getTokenRoyaltyInfo.ts | 2 +- .../royalties/write/setDefaultRoyaltyInfo.ts | 4 +- .../royalties/write/setTokenRoyaltyInfo.ts | 4 +- .../subscriptions/addContractSubscription.ts | 10 +- .../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/contract/write/write.ts | 4 +- src/server/routes/deploy/prebuilt.ts | 4 +- src/server/routes/deploy/prebuilts/edition.ts | 4 +- .../routes/deploy/prebuilts/editionDrop.ts | 4 +- .../routes/deploy/prebuilts/marketplaceV3.ts | 4 +- .../routes/deploy/prebuilts/multiwrap.ts | 4 +- .../routes/deploy/prebuilts/nftCollection.ts | 4 +- src/server/routes/deploy/prebuilts/nftDrop.ts | 4 +- src/server/routes/deploy/prebuilts/pack.ts | 4 +- .../routes/deploy/prebuilts/signatureDrop.ts | 4 +- src/server/routes/deploy/prebuilts/split.ts | 4 +- src/server/routes/deploy/prebuilts/token.ts | 4 +- .../routes/deploy/prebuilts/tokenDrop.ts | 4 +- src/server/routes/deploy/prebuilts/vote.ts | 4 +- src/server/routes/deploy/published.ts | 4 +- src/server/routes/relayer/index.ts | 6 +- src/server/routes/transaction/cancel.ts | 4 +- src/server/routes/transaction/retry.ts | 2 +- src/server/routes/transaction/sync-retry.ts | 2 +- 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 +- src/server/utils/transactionOverrides.ts | 2 +- .../utils/wallets/createGcpKmsWallet.ts | 2 +- src/server/utils/wallets/createLocalWallet.ts | 2 +- src/server/utils/wallets/createSmartWallet.ts | 2 +- .../utils/wallets/fetchAwsKmsWalletParams.ts | 2 +- .../utils/wallets/fetchGcpKmsWalletParams.ts | 2 +- src/server/utils/wallets/getLocalWallet.ts | 2 +- src/server/utils/wallets/getSmartWallet.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} | 4 +- ...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} | 4 +- ...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} | 2 +- .../db/wallets/{nonceMap.ts => nonce-map.ts} | 2 +- ...letDetails.ts => update-wallet-details.ts} | 0 .../{walletNonce.ts => wallet-nonce.ts} | 4 +- .../{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 | 4 +- .../cache/{accessToken.ts => access-token.ts} | 2 +- .../cache/{authWallet.ts => auth-wallet.ts} | 4 +- .../cache/{clearCache.ts => clear-cache.ts} | 10 +- .../cache/{getConfig.ts => get-config.ts} | 2 +- .../cache/{getContract.ts => get-contract.ts} | 2 +- .../{getContractv5.ts => get-contractv5.ts} | 0 .../utils/cache/{getSdk.ts => get-sdk.ts} | 2 +- ...martWalletV5.ts => get-smart-wallet-v5.ts} | 0 .../cache/{getWallet.ts => get-wallet.ts} | 2 +- .../cache/{getWebhook.ts => get-webhook.ts} | 2 +- src/shared/utils/chain.ts | 2 +- ...{clearCacheCron.ts => clear-cache-cron.ts} | 4 +- .../cron/{isValidCron.ts => is-valid-cron.ts} | 0 .../{getBlockTime.ts => get-block-time.ts} | 0 .../{primitiveTypes.ts => primitive-types.ts} | 0 src/shared/utils/prometheus.ts | 2 +- ...elTransaction.ts => cancel-transaction.ts} | 2 +- ...rtTransaction.ts => insert-transaction.ts} | 6 +- ...queueTransation.ts => queue-transation.ts} | 2 +- ...tion.ts => simulate-queued-transaction.ts} | 2 +- src/worker/indexers/chainIndexerRegistry.ts | 2 +- src/worker/listeners/chainIndexerListener.ts | 2 +- src/worker/listeners/configListener.ts | 4 +- src/worker/listeners/webhookListener.ts | 2 +- src/worker/queues/processEventLogsQueue.ts | 2 +- .../queues/processTransactionReceiptsQueue.ts | 2 +- src/worker/queues/sendWebhookQueue.ts | 2 +- .../tasks/cancelRecycledNoncesWorker.ts | 4 +- src/worker/tasks/chainIndexer.ts | 6 +- src/worker/tasks/manageChainIndexers.ts | 2 +- src/worker/tasks/mineTransactionWorker.ts | 6 +- src/worker/tasks/nonceHealthCheckWorker.ts | 2 +- src/worker/tasks/nonceResyncWorker.ts | 4 +- src/worker/tasks/processEventLogsWorker.ts | 6 +- .../tasks/processTransactionReceiptsWorker.ts | 4 +- src/worker/tasks/pruneTransactionsWorker.ts | 2 +- src/worker/tasks/sendTransactionWorker.ts | 4 +- tests/unit/auth.test.ts | 10 +- tests/unit/chain.test.ts | 2 +- 309 files changed, 571 insertions(+), 426 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} (99%) 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} (99%) rename src/shared/db/wallets/{nonceMap.ts => nonce-map.ts} (97%) rename src/shared/db/wallets/{updateWalletDetails.ts => update-wallet-details.ts} (100%) rename src/shared/db/wallets/{walletNonce.ts => wallet-nonce.ts} (98%) 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%) rename src/shared/utils/cache/{accessToken.ts => access-token.ts} (91%) rename src/shared/utils/cache/{authWallet.ts => auth-wallet.ts} (95%) rename src/shared/utils/cache/{clearCache.ts => clear-cache.ts} (58%) rename src/shared/utils/cache/{getConfig.ts => get-config.ts} (82%) rename src/shared/utils/cache/{getContract.ts => get-contract.ts} (96%) rename src/shared/utils/cache/{getContractv5.ts => get-contractv5.ts} (100%) rename src/shared/utils/cache/{getSdk.ts => get-sdk.ts} (98%) rename src/shared/utils/cache/{getSmartWalletV5.ts => get-smart-wallet-v5.ts} (100%) rename src/shared/utils/cache/{getWallet.ts => get-wallet.ts} (99%) rename src/shared/utils/cache/{getWebhook.ts => get-webhook.ts} (90%) rename src/shared/utils/cron/{clearCacheCron.ts => clear-cache-cron.ts} (80%) rename src/shared/utils/cron/{isValidCron.ts => is-valid-cron.ts} (100%) rename src/shared/utils/indexer/{getBlockTime.ts => get-block-time.ts} (100%) rename src/shared/utils/{primitiveTypes.ts => primitive-types.ts} (100%) rename src/shared/utils/transaction/{cancelTransaction.ts => cancel-transaction.ts} (95%) rename src/shared/utils/transaction/{insertTransaction.ts => insert-transaction.ts} (96%) rename src/shared/utils/transaction/{queueTransation.ts => queue-transation.ts} (97%) rename src/shared/utils/transaction/{simulateQueuedTransaction.ts => simulate-queued-transaction.ts} (96%) diff --git a/renamer.ts b/renamer.ts new file mode 100644 index 000000000..807ce8355 --- /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/utils"); // Change as needed +processFilesAndFolders(projectRoot); diff --git a/src/server/index.ts b/src/server/index.ts index a0a576dfc..995e93c38 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -3,7 +3,7 @@ import fastify, { type FastifyInstance } from "fastify"; import * as fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; -import { clearCacheCron } from "../shared/utils/cron/clearCacheCron"; +import { clearCacheCron } from "../shared/utils/cron/clear-cache-cron"; import { env } from "../shared/utils/env"; import { logger } from "../shared/utils/logger"; import { metricsServer } from "../shared/utils/prometheus"; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 022519a41..41ad84e0d 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -10,15 +10,15 @@ 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"; -import { getAuthWallet } from "../../shared/utils/cache/authWallet"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { getAccessToken } from "../../shared/utils/cache/access-token"; +import { getAuthWallet } from "../../shared/utils/cache/auth-wallet"; +import { getConfig } from "../../shared/utils/cache/get-config"; +import { getWebhooksByEventType } from "../../shared/utils/cache/get-webhook"; import { getKeypair } from "../../shared/utils/cache/keypair"; import { env } from "../../shared/utils/env"; import { logger } from "../../shared/utils/logger"; diff --git a/src/server/middleware/cors.ts b/src/server/middleware/cors.ts index da81b02fa..62e074ee4 100644 --- a/src/server/middleware/cors.ts +++ b/src/server/middleware/cors.ts @@ -1,5 +1,5 @@ import type { FastifyInstance } from "fastify"; -import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getConfig } from "../../shared/utils/cache/get-config"; import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; const STANDARD_METHODS = "GET,POST,DELETE,PUT,PATCH,HEAD,PUT,PATCH,POST,DELETE"; 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/admin/transaction.ts b/src/server/routes/admin/transaction.ts index d8eace0b7..4308a5390 100644 --- a/src/server/routes/admin/transaction.ts +++ b/src/server/routes/admin/transaction.ts @@ -4,8 +4,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { stringify } from "thirdweb/utils"; import { TransactionDB } from "../../../shared/db/transactions/db"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; -import { maybeDate } from "../../../shared/utils/primitiveTypes"; +import { getConfig } from "../../../shared/utils/cache/get-config"; +import { maybeDate } from "../../../shared/utils/primitive-types"; import { redis } from "../../../shared/utils/redis/redis"; import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; diff --git a/src/server/routes/auth/access-tokens/create.ts b/src/server/routes/auth/access-tokens/create.ts index b69b6cf20..c45931417 100644 --- a/src/server/routes/auth/access-tokens/create.ts +++ b/src/server/routes/auth/access-tokens/create.ts @@ -3,10 +3,10 @@ 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 { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { createToken } from "../../../../shared/db/tokens/create-token"; +import { accessTokenCache } from "../../../../shared/utils/cache/access-token"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { env } from "../../../../shared/utils/env"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { AccessTokenSchema } from "./getAll"; 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..6c41a3c96 100644 --- a/src/server/routes/auth/access-tokens/revoke.ts +++ b/src/server/routes/auth/access-tokens/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 { revokeToken } from "../../../../shared/db/tokens/revokeToken"; -import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; +import { revokeToken } from "../../../../shared/db/tokens/revoke-token"; +import { accessTokenCache } from "../../../../shared/utils/cache/access-token"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/auth/access-tokens/update.ts b/src/server/routes/auth/access-tokens/update.ts index f09b5ce5f..0c0c178ee 100644 --- a/src/server/routes/auth/access-tokens/update.ts +++ b/src/server/routes/auth/access-tokens/update.ts @@ -1,8 +1,8 @@ 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 { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; +import { updateToken } from "../../../../shared/db/tokens/update-token"; +import { accessTokenCache } from "../../../../shared/utils/cache/access-token"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Object({ 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/cancel-nonces.ts b/src/server/routes/backend-wallet/cancel-nonces.ts index 47803817c..89af789c0 100644 --- a/src/server/routes/backend-wallet/cancel-nonces.ts +++ b/src/server/routes/backend-wallet/cancel-nonces.ts @@ -5,7 +5,7 @@ import { eth_getTransactionCount, getRpcClient } from "thirdweb"; import { checksumAddress } from "thirdweb/utils"; import { getChain } from "../../../shared/utils/chain"; import { thirdwebClient } from "../../../shared/utils/sdk"; -import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancelTransaction"; +import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancel-transaction"; import { requestQuerystringSchema, standardResponseSchema, diff --git a/src/server/routes/backend-wallet/create.ts b/src/server/routes/backend-wallet/create.ts index 64162c5d0..2fc800361 100644 --- a/src/server/routes/backend-wallet/create.ts +++ b/src/server/routes/backend-wallet/create.ts @@ -7,7 +7,7 @@ import { ENTRYPOINT_ADDRESS_v0_7, } from "thirdweb/wallets/smart"; import { WalletType } from "../../../shared/schemas/wallet"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/get-config"; import { createCustomError } from "../../middleware/error"; 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/getBalance.ts b/src/server/routes/backend-wallet/getBalance.ts index 01f262991..362a98909 100644 --- a/src/server/routes/backend-wallet/getBalance.ts +++ b/src/server/routes/backend-wallet/getBalance.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getSdk } from "../../../shared/utils/cache/getSdk"; +import { getSdk } from "../../../shared/utils/cache/get-sdk"; import { AddressSchema } from "../../schemas/address"; import { currencyValueSchema, 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..f60b6b30a 100644 --- a/src/server/routes/backend-wallet/getTransactionsByNonce.ts +++ b/src/server/routes/backend-wallet/getTransactionsByNonce.ts @@ -2,8 +2,8 @@ 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 { normalizeAddress } from "../../../shared/utils/primitiveTypes"; +import { getNonceMap } from "../../../shared/db/wallets/nonce-map"; +import { normalizeAddress } from "../../../shared/utils/primitive-types"; import type { AnyTransaction } from "../../../shared/utils/transaction/types"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/backend-wallet/import.ts b/src/server/routes/backend-wallet/import.ts index 88a93d48b..9d86902de 100644 --- a/src/server/routes/backend-wallet/import.ts +++ b/src/server/routes/backend-wallet/import.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/get-config"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; 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/sendTransaction.ts b/src/server/routes/backend-wallet/sendTransaction.ts index d23add987..66d462482 100644 --- a/src/server/routes/backend-wallet/sendTransaction.ts +++ b/src/server/routes/backend-wallet/sendTransaction.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, Hex } from "thirdweb"; -import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../shared/utils/transaction/insert-transaction"; import { AddressSchema } from "../../schemas/address"; import { requestQuerystringSchema, diff --git a/src/server/routes/backend-wallet/sendTransactionBatch.ts b/src/server/routes/backend-wallet/sendTransactionBatch.ts index d887e9bed..92df6729c 100644 --- a/src/server/routes/backend-wallet/sendTransactionBatch.ts +++ b/src/server/routes/backend-wallet/sendTransactionBatch.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, Hex } from "thirdweb"; -import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../shared/utils/transaction/insert-transaction"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { txOverridesWithValueSchema } from "../../schemas/txOverrides"; 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/signTransaction.ts b/src/server/routes/backend-wallet/signTransaction.ts index 7af06715e..74eba697a 100644 --- a/src/server/routes/backend-wallet/signTransaction.ts +++ b/src/server/routes/backend-wallet/signTransaction.ts @@ -7,7 +7,7 @@ import { getChecksumAddress, maybeBigInt, maybeInt, -} from "../../../shared/utils/primitiveTypes"; +} from "../../../shared/utils/primitive-types"; import { toTransactionType } from "../../../shared/utils/sdk"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/signTypedData.ts b/src/server/routes/backend-wallet/signTypedData.ts index 6033e309b..e1eee6e3b 100644 --- a/src/server/routes/backend-wallet/signTypedData.ts +++ b/src/server/routes/backend-wallet/signTypedData.ts @@ -2,7 +2,7 @@ import type { TypedDataSigner } from "@ethersproject/abstract-signer"; import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getWallet } from "../../../shared/utils/cache/getWallet"; +import { getWallet } from "../../../shared/utils/cache/get-wallet"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletHeaderSchema } from "../../schemas/wallet"; diff --git a/src/server/routes/backend-wallet/simulateTransaction.ts b/src/server/routes/backend-wallet/simulateTransaction.ts index eec049d0f..b8cee7866 100644 --- a/src/server/routes/backend-wallet/simulateTransaction.ts +++ b/src/server/routes/backend-wallet/simulateTransaction.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; import type { Address, Hex } from "thirdweb"; -import { doSimulateTransaction } from "../../../shared/utils/transaction/simulateQueuedTransaction"; +import { doSimulateTransaction } from "../../../shared/utils/transaction/simulate-queued-transaction"; import type { QueuedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; diff --git a/src/server/routes/backend-wallet/transfer.ts b/src/server/routes/backend-wallet/transfer.ts index 98a1f6fb4..042dde64a 100644 --- a/src/server/routes/backend-wallet/transfer.ts +++ b/src/server/routes/backend-wallet/transfer.ts @@ -11,9 +11,9 @@ import { import { transfer as transferERC20 } from "thirdweb/extensions/erc20"; import { isContractDeployed, resolvePromisedValue } from "thirdweb/utils"; import { getChain } from "../../../shared/utils/chain"; -import { normalizeAddress } from "../../../shared/utils/primitiveTypes"; +import { normalizeAddress } from "../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../shared/utils/sdk"; -import { insertTransaction } from "../../../shared/utils/transaction/insertTransaction"; +import { insertTransaction } from "../../../shared/utils/transaction/insert-transaction"; import type { InsertedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; 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/backend-wallet/withdraw.ts b/src/server/routes/backend-wallet/withdraw.ts index 0cfe6fe36..50b27a87a 100644 --- a/src/server/routes/backend-wallet/withdraw.ts +++ b/src/server/routes/backend-wallet/withdraw.ts @@ -12,7 +12,7 @@ import { getWalletBalance } from "thirdweb/wallets"; import { getAccount } from "../../../shared/utils/account"; import { getChain } from "../../../shared/utils/chain"; import { logger } from "../../../shared/utils/logger"; -import { getChecksumAddress } from "../../../shared/utils/primitiveTypes"; +import { getChecksumAddress } from "../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../shared/utils/sdk"; import type { PopulatedTransaction } from "../../../shared/utils/transaction/types"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/chain/getAll.ts b/src/server/routes/chain/getAll.ts index c5644f337..2f3efcda5 100644 --- a/src/server/routes/chain/getAll.ts +++ b/src/server/routes/chain/getAll.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { fetchChains } from "@thirdweb-dev/chains"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/get-config"; import { chainResponseSchema } from "../../schemas/chain"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/auth/get.ts b/src/server/routes/configuration/auth/get.ts index 23163fa35..e8ff03db6 100644 --- a/src/server/routes/configuration/auth/get.ts +++ b/src/server/routes/configuration/auth/get.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/auth/update.ts b/src/server/routes/configuration/auth/update.ts index 07ab148b3..518a8d1ac 100644 --- a/src/server/routes/configuration/auth/update.ts +++ b/src/server/routes/configuration/auth/update.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/backend-wallet-balance/get.ts b/src/server/routes/configuration/backend-wallet-balance/get.ts index ab430ecc4..5f0fd671b 100644 --- a/src/server/routes/configuration/backend-wallet-balance/get.ts +++ b/src/server/routes/configuration/backend-wallet-balance/get.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/backend-wallet-balance/update.ts b/src/server/routes/configuration/backend-wallet-balance/update.ts index e47a75af6..f4a71d569 100644 --- a/src/server/routes/configuration/backend-wallet-balance/update.ts +++ b/src/server/routes/configuration/backend-wallet-balance/update.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { WeiAmountStringSchema } from "../../../schemas/number"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cache/get.ts b/src/server/routes/configuration/cache/get.ts index 5ff178bd0..069517ad9 100644 --- a/src/server/routes/configuration/cache/get.ts +++ b/src/server/routes/configuration/cache/get.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/cache/update.ts b/src/server/routes/configuration/cache/update.ts index a87ef1546..7abdeadfd 100644 --- a/src/server/routes/configuration/cache/update.ts +++ b/src/server/routes/configuration/cache/update.ts @@ -1,10 +1,10 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; -import { clearCacheCron } from "../../../../shared/utils/cron/clearCacheCron"; -import { isValidCron } from "../../../../shared/utils/cron/isValidCron"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; +import { clearCacheCron } from "../../../../shared/utils/cron/clear-cache-cron"; +import { isValidCron } from "../../../../shared/utils/cron/is-valid-cron"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/chains/get.ts b/src/server/routes/configuration/chains/get.ts index 6b38f9139..c217b9cbc 100644 --- a/src/server/routes/configuration/chains/get.ts +++ b/src/server/routes/configuration/chains/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { chainResponseSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/chains/update.ts b/src/server/routes/configuration/chains/update.ts index 589eb0797..9b2c961de 100644 --- a/src/server/routes/configuration/chains/update.ts +++ b/src/server/routes/configuration/chains/update.ts @@ -1,9 +1,9 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; -import { sdkCache } from "../../../../shared/utils/cache/getSdk"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; +import { sdkCache } from "../../../../shared/utils/cache/get-sdk"; import { chainResponseSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/contract-subscriptions/get.ts b/src/server/routes/configuration/contract-subscriptions/get.ts index ae6dc97dc..17bb61314 100644 --- a/src/server/routes/configuration/contract-subscriptions/get.ts +++ b/src/server/routes/configuration/contract-subscriptions/get.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { contractSubscriptionConfigurationSchema, standardResponseSchema, diff --git a/src/server/routes/configuration/contract-subscriptions/update.ts b/src/server/routes/configuration/contract-subscriptions/update.ts index fdc0897d0..1f56319da 100644 --- a/src/server/routes/configuration/contract-subscriptions/update.ts +++ b/src/server/routes/configuration/contract-subscriptions/update.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { createCustomError } from "../../../middleware/error"; import { contractSubscriptionConfigurationSchema, diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index 24d085d07..609d3b649 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cors/get.ts b/src/server/routes/configuration/cors/get.ts index f5cbab52b..38ba869bd 100644 --- a/src/server/routes/configuration/cors/get.ts +++ b/src/server/routes/configuration/cors/get.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; 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..a9ddabb6e 100644 --- a/src/server/routes/configuration/cors/remove.ts +++ b/src/server/routes/configuration/cors/remove.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index a1a7540bc..a6c7aaf06 100644 --- a/src/server/routes/configuration/cors/set.ts +++ b/src/server/routes/configuration/cors/set.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/ip/get.ts b/src/server/routes/configuration/ip/get.ts index 1f916c14f..7d7b8d412 100644 --- a/src/server/routes/configuration/ip/get.ts +++ b/src/server/routes/configuration/ip/get.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/ip/set.ts b/src/server/routes/configuration/ip/set.ts index 8dab64868..001c9debf 100644 --- a/src/server/routes/configuration/ip/set.ts +++ b/src/server/routes/configuration/ip/set.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/transactions/get.ts b/src/server/routes/configuration/transactions/get.ts index c1d95ff5e..d94ebb09d 100644 --- a/src/server/routes/configuration/transactions/get.ts +++ b/src/server/routes/configuration/transactions/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/transactions/update.ts b/src/server/routes/configuration/transactions/update.ts index c5322dca4..0965de34c 100644 --- a/src/server/routes/configuration/transactions/update.ts +++ b/src/server/routes/configuration/transactions/update.ts @@ -1,8 +1,8 @@ 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 { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const requestBodySchema = Type.Partial( diff --git a/src/server/routes/configuration/wallets/get.ts b/src/server/routes/configuration/wallets/get.ts index eded75a5e..635ea5223 100644 --- a/src/server/routes/configuration/wallets/get.ts +++ b/src/server/routes/configuration/wallets/get.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { WalletType } from "../../../../shared/schemas/wallet"; -import { getConfig } from "../../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../../shared/utils/cache/get-config"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/wallets/update.ts b/src/server/routes/configuration/wallets/update.ts index 9b79e6146..f0e591038 100644 --- a/src/server/routes/configuration/wallets/update.ts +++ b/src/server/routes/configuration/wallets/update.ts @@ -1,9 +1,9 @@ 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 { getConfig } from "../../../../shared/utils/cache/get-config"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/contract/events/getAllEvents.ts b/src/server/routes/contract/events/getAllEvents.ts index 5d6150779..712d7ca06 100644 --- a/src/server/routes/contract/events/getAllEvents.ts +++ b/src/server/routes/contract/events/getAllEvents.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/get-contract"; import { contractEventSchema, eventsQuerystringSchema, diff --git a/src/server/routes/contract/events/getContractEventLogs.ts b/src/server/routes/contract/events/getContractEventLogs.ts index 47a12a269..a16266b8d 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/contract-event-logs/get-contract-event-logs"; +import { isContractSubscribed } from "../../../../shared/db/contract-subscriptions/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..c93ffaa4d 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/contract-event-logs/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/getEvents.ts b/src/server/routes/contract/events/getEvents.ts index 69cabe01c..fa81a5739 100644 --- a/src/server/routes/contract/events/getEvents.ts +++ b/src/server/routes/contract/events/getEvents.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/get-contract"; import { contractEventSchema, eventsQuerystringSchema, diff --git a/src/server/routes/contract/events/paginateEventLogs.ts b/src/server/routes/contract/events/paginateEventLogs.ts index 1767a4c07..7a4cae470 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/contract-event-logs/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/read/getAllAdmins.ts b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts index ea6428780..af130c242 100644 --- a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts +++ b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/account/read/getAllSessions.ts b/src/server/routes/contract/extensions/account/read/getAllSessions.ts index 68db22c51..13f1e91ae 100644 --- a/src/server/routes/contract/extensions/account/read/getAllSessions.ts +++ b/src/server/routes/contract/extensions/account/read/getAllSessions.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/grantAdmin.ts b/src/server/routes/contract/extensions/account/write/grantAdmin.ts index 2a7120ca8..d3ba73f78 100644 --- a/src/server/routes/contract/extensions/account/write/grantAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/grantAdmin.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/grantSession.ts b/src/server/routes/contract/extensions/account/write/grantSession.ts index ab04cfcfa..832146226 100644 --- a/src/server/routes/contract/extensions/account/write/grantSession.ts +++ b/src/server/routes/contract/extensions/account/write/grantSession.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts index 2b19ee104..7d26c96ed 100644 --- a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/revokeSession.ts b/src/server/routes/contract/extensions/account/write/revokeSession.ts index 58c74d8c7..bb6cf526a 100644 --- a/src/server/routes/contract/extensions/account/write/revokeSession.ts +++ b/src/server/routes/contract/extensions/account/write/revokeSession.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/account/write/updateSession.ts b/src/server/routes/contract/extensions/account/write/updateSession.ts index daade19b1..c7d5aaf38 100644 --- a/src/server/routes/contract/extensions/account/write/updateSession.ts +++ b/src/server/routes/contract/extensions/account/write/updateSession.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts index 7fd003c0d..99109fa48 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts index d3a9020cd..e6af059fc 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts index bce8ff614..2f497bace 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts b/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts index e540a46f0..fc3453f87 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { predictAddress } from "thirdweb/wallets/smart"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { getContractV5 } from "../../../../../../shared/utils/cache/get-contractv5"; import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts b/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts index 1eb2a60b4..8cb672049 100644 --- a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts +++ b/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { createAccount as factoryCreateAccount } from "thirdweb/extensions/erc4337"; import { isHex, stringToHex } from "thirdweb/utils"; import { predictAddress } from "thirdweb/wallets/smart"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; +import { getContractV5 } from "../../../../../../shared/utils/cache/get-contractv5"; import { redis } from "../../../../../../shared/utils/redis/redis"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; import { prebuiltDeployResponseSchema } from "../../../../../schemas/prebuilts"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts index 2cfa5c07a..7559cfb2f 100644 --- a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts index c5bcba524..54b8ad7a9 100644 --- a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/get.ts b/src/server/routes/contract/extensions/erc1155/read/get.ts index acb439591..95133aae6 100644 --- a/src/server/routes/contract/extensions/erc1155/read/get.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts index 739707d3c..69fb5b7c7 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getAll.ts b/src/server/routes/contract/extensions/erc1155/read/getAll.ts index 42b563c1f..18b0ee065 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc1155/read/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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts index 9003f2db4..7da7ed4e7 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts index 8b061be03..49a90d43e 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts index 05e53b95e..b8e3e0585 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts index d4a8f08dc..2015d0fad 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts index ac1fac7dd..1926e67c6 100644 --- a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts index ab95c40e3..936dfbc5d 100644 --- a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts @@ -5,9 +5,9 @@ import { getContract, type Address, type Hex } from "thirdweb"; import type { NFTInput } from "thirdweb/dist/types/utils/nft/parseNft"; import { generateMintSignature } from "thirdweb/extensions/erc1155"; import { getAccount } from "../../../../../../shared/utils/account"; -import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/get-contract"; import { getChain } from "../../../../../../shared/utils/chain"; -import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { maybeBigInt } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; diff --git a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts index 21b24ad92..363772c4c 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts index e1dafd5cf..634249cd4 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts index 5164f0a83..4a80f051e 100644 --- a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts +++ b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burn.ts b/src/server/routes/contract/extensions/erc1155/write/burn.ts index d01ea058d..a994f1e2e 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burn.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts index a78cb430c..a292bd2b4 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts index c716b1f61..9de1d79ed 100644 --- a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/claimTo.ts @@ -3,8 +3,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc1155"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/get-contractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; 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..8c5b2bd39 100644 --- a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts index 58fa670ab..34cf8dc40 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts index e8776756a..e8bf3168e 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts index 20e1b01a6..cacee565b 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts @@ -6,7 +6,7 @@ import { mintTo } from "thirdweb/extensions/erc1155"; import type { NFTInput } from "thirdweb/utils"; import { getChain } from "../../../../../../shared/utils/chain"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts index 510469914..2ad9d8f85 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts index 36e81475b..da40cd380 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type setBatchSantiziedClaimConditionsRequestSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts index 6f3021397..6d3e9693b 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts index b1e12fb4b..395939dc2 100644 --- a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts @@ -3,8 +3,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { signature1155OutputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/transfer.ts b/src/server/routes/contract/extensions/erc1155/write/transfer.ts index 61d46227a..947918d67 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transfer.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract, type Hex } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema, HexSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts index 66229cc15..207029903 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract, type Hex } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema, HexSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; 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..4496ec6cc 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts index 0689517fa..822bd6ad6 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts index 8386bc054..bd3d14636 100644 --- a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts index 167ec4cf4..6f627f965 100644 --- a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/canClaim.ts b/src/server/routes/contract/extensions/erc20/read/canClaim.ts index 078c8d7f2..962b16e4b 100644 --- a/src/server/routes/contract/extensions/erc20/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc20/read/canClaim.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/get.ts b/src/server/routes/contract/extensions/erc20/read/get.ts index 88f532f0b..ce429d099 100644 --- a/src/server/routes/contract/extensions/erc20/read/get.ts +++ b/src/server/routes/contract/extensions/erc20/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc20ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts index 15a992342..b0813f15b 100644 --- a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts index 841ebcda3..8891c2e43 100644 --- a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts index 19b7a12de..4a920f618 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts index 0778a85ac..69ce75568 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts index ae6ccff36..a35a2348d 100644 --- a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc20"; import { getAccount } from "../../../../../../shared/utils/account"; -import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/get-contract"; import { getChain } from "../../../../../../shared/utils/chain"; -import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { maybeBigInt } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts index 06ee4548b..2146e939b 100644 --- a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burn.ts b/src/server/routes/contract/extensions/erc20/write/burn.ts index 7c9f093f7..a0d8758b1 100644 --- a/src/server/routes/contract/extensions/erc20/write/burn.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc20ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts index ad5498414..5f111985c 100644 --- a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/claimTo.ts b/src/server/routes/contract/extensions/erc20/write/claimTo.ts index db7678729..548bf7c9c 100644 --- a/src/server/routes/contract/extensions/erc20/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/claimTo.ts @@ -3,8 +3,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc20"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/get-contractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { erc20ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts index dd3e4b601..5fa723b24 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/mintTo.ts b/src/server/routes/contract/extensions/erc20/write/mintTo.ts index ea2b170e4..282f213ca 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintTo.ts @@ -5,7 +5,7 @@ import { getContract } from "thirdweb"; import { mintTo } from "thirdweb/extensions/erc20"; import { getChain } from "../../../../../../shared/utils/chain"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts index 7cad12a44..a92410c90 100644 --- a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts +++ b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts index cc6ced02c..625c387ff 100644 --- a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts index 182259b9b..07f544103 100644 --- a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts @@ -3,8 +3,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { signature20OutputSchema } from "../../../../../schemas/erc20"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/transfer.ts b/src/server/routes/contract/extensions/erc20/write/transfer.ts index 75a3c2d14..807f0c43d 100644 --- a/src/server/routes/contract/extensions/erc20/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc20/write/transfer.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transfer } from "thirdweb/extensions/erc20"; import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; import { TokenAmountStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts index ec1c46403..071edddfc 100644 --- a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc20"; import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; import { TokenAmountStringSchema } from "../../../../../schemas/number"; 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..9ee27d424 100644 --- a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts index 1bad0235d..690a65d8a 100644 --- a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { erc721ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/canClaim.ts b/src/server/routes/contract/extensions/erc721/read/canClaim.ts index 6aa53c54d..06a4e4b8c 100644 --- a/src/server/routes/contract/extensions/erc721/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc721/read/canClaim.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/get.ts b/src/server/routes/contract/extensions/erc721/read/get.ts index e5f332ab2..993184d7d 100644 --- a/src/server/routes/contract/extensions/erc721/read/get.ts +++ b/src/server/routes/contract/extensions/erc721/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts index f24521b3d..e9f331e1b 100644 --- a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getAll.ts b/src/server/routes/contract/extensions/erc721/read/getAll.ts index 4eb8bacab..20cec27c6 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc721/read/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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts index 8d4a62f0e..fd0678711 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts index 88d552910..f23ea7b9b 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts index d39672dac..7d9f4d8cb 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { claimerProofSchema } from "../../../../../schemas/claimConditions"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/getOwned.ts b/src/server/routes/contract/extensions/erc721/read/getOwned.ts index 311ef318c..16bc18f24 100644 --- a/src/server/routes/contract/extensions/erc721/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc721/read/getOwned.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/isApproved.ts b/src/server/routes/contract/extensions/erc721/read/isApproved.ts index 22d3cbecd..6462ccd2f 100644 --- a/src/server/routes/contract/extensions/erc721/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc721/read/isApproved.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts index 281399a7e..1fc82b9f1 100644 --- a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract, type Address, type Hex } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc721"; import { getAccount } from "../../../../../../shared/utils/account"; -import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/getContract"; +import { getContract as getContractV4 } from "../../../../../../shared/utils/cache/get-contract"; import { getChain } from "../../../../../../shared/utils/chain"; -import { maybeBigInt } from "../../../../../../shared/utils/primitiveTypes"; +import { maybeBigInt } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { diff --git a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts index 342f63448..03a62fcd1 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/totalCount.ts b/src/server/routes/contract/extensions/erc721/read/totalCount.ts index 5a6cd5809..7c5bd1b3b 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts index 88c4b12f8..6c914d841 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/burn.ts b/src/server/routes/contract/extensions/erc721/write/burn.ts index 259ba1af1..10d9f4a57 100644 --- a/src/server/routes/contract/extensions/erc721/write/burn.ts +++ b/src/server/routes/contract/extensions/erc721/write/burn.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/claimTo.ts b/src/server/routes/contract/extensions/erc721/write/claimTo.ts index 1366bb9cb..fdb553dea 100644 --- a/src/server/routes/contract/extensions/erc721/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/claimTo.ts @@ -3,8 +3,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { claimTo } from "thirdweb/extensions/erc721"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { getContractV5 } from "../../../../../../shared/utils/cache/get-contractv5"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; 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..ac6283318 100644 --- a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts index 38e5aa299..9f29db2ab 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mintTo.ts index 7a70f011f..5ffb25a49 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintTo.ts @@ -6,7 +6,7 @@ import { mintTo } from "thirdweb/extensions/erc721"; import type { NFTInput } from "thirdweb/utils"; import { getChain } from "../../../../../../shared/utils/chain"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts index 3f3c29c8f..08fc2cd68 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts index ad7fd5aa8..701d6dcb1 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts index 42afb844d..cae13f65f 100644 --- a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts index 808c14246..173b9208b 100644 --- a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts @@ -6,10 +6,10 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; -import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; -import { insertTransaction } from "../../../../../../shared/utils/transaction/insertTransaction"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; +import { getContractV5 } from "../../../../../../shared/utils/cache/get-contractv5"; +import { insertTransaction } from "../../../../../../shared/utils/transaction/insert-transaction"; import type { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { signature721OutputSchema } from "../../../../../schemas/nft"; import { signature721OutputSchemaV5 } from "../../../../../schemas/nft/v5"; diff --git a/src/server/routes/contract/extensions/erc721/write/transfer.ts b/src/server/routes/contract/extensions/erc721/write/transfer.ts index 87835ca09..edbeb4243 100644 --- a/src/server/routes/contract/extensions/erc721/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc721/write/transfer.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts index e19e8cb9d..8a6b87038 100644 --- a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; import { getChain } from "../../../../../../shared/utils/chain"; -import { getChecksumAddress } from "../../../../../../shared/utils/primitiveTypes"; +import { getChecksumAddress } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { queueTransaction } from "../../../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../../../shared/utils/transaction/queue-transation"; import { AddressSchema } from "../../../../../schemas/address"; import { NumberStringSchema } from "../../../../../schemas/number"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts index d9c9fb6f7..4e32ebe1b 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts index c8a610821..08a14d3ca 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts index 5debad7eb..c78203a7e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts index a7e35ab5d..3f4a0b73f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts index cd7b396bd..f7edbf985 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts index c46910f28..d621ea00b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts index 4b261a5a3..40f28cbc0 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts index 3351dd6d7..00434d4b0 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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..8b4c731bc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..b7f98a988 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..c1f79318a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..8bd643da5 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, 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..fa41b010a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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..864792849 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, 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..f7ac3e544 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts index f7ebc52d2..ffc390271 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts index 25a65fcc1..3ad7cc021 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts index 53353271c..7b905ed9a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts index de9247202..d757ce2a9 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts index c02d495e9..8f4d75131 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { currencyValueSchema, marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts index 4813b190c..6d9147582 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts index 95d4e19ed..8d08adeb2 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts index 6f839ff0c..6aa71c55c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { bidSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts index a70f469a6..91d80a481 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, 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..2cd6ee1f9 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..8f80bd04a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..c24b9ab3d 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..a76809151 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..ddf67ed63 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { englishAuctionInputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { marketplaceV3ContractParamSchema, 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..831bae33b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..0f8d1aaac 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts index e4b9271c7..2e24eb416 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts index 01c1b6bcd..3f93ef461 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceFilterSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts index d752431fc..ab67a3570 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts index ada1fb3e6..b8dc3259a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, standardResponseSchema, 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..8b5931680 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..a663d0b3b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, 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..14c022b42 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; import { OfferV3InputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index f642809bf..ae16a2d0e 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/get-contract"; import { abiSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/metadata/events.ts b/src/server/routes/contract/metadata/events.ts index f16d65e2f..aa5f5db05 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/get-contract"; import { abiEventSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/metadata/extensions.ts b/src/server/routes/contract/metadata/extensions.ts index d4d553173..54fcfe539 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import { getAllDetectedExtensionNames } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/metadata/functions.ts b/src/server/routes/contract/metadata/functions.ts index 3d45736ba..2c037b2b7 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/get-contract"; import { abiFunctionSchema } from "../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/read/read.ts b/src/server/routes/contract/read/read.ts index 81721a098..d2a58e2ad 100644 --- a/src/server/routes/contract/read/read.ts +++ b/src/server/routes/contract/read/read.ts @@ -1,7 +1,7 @@ import { Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../shared/utils/cache/get-contract"; import { prettifyError } from "../../../../shared/utils/error"; import { createCustomError } from "../../../middleware/error"; import { diff --git a/src/server/routes/contract/roles/read/get.ts b/src/server/routes/contract/roles/read/get.ts index f07c1479f..7e0edcb5f 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, diff --git a/src/server/routes/contract/roles/read/getAll.ts b/src/server/routes/contract/roles/read/getAll.ts index ee4a8d920..54b688b86 100644 --- a/src/server/routes/contract/roles/read/getAll.ts +++ b/src/server/routes/contract/roles/read/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 { getContract } from "../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { rolesResponseSchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/roles/write/grant.ts b/src/server/routes/contract/roles/write/grant.ts index 538b2d869..d453d6f83 100644 --- a/src/server/routes/contract/roles/write/grant.ts +++ b/src/server/routes/contract/roles/write/grant.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/roles/write/revoke.ts b/src/server/routes/contract/roles/write/revoke.ts index 063f9c8e1..908a1b7d5 100644 --- a/src/server/routes/contract/roles/write/revoke.ts +++ b/src/server/routes/contract/roles/write/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 { queueTx } from "../../../../../shared/db/transactions/queueTx"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../schemas/address"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts index ed85d8712..1aac3f328 100644 --- a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts index 163ae5fee..4497ed123 100644 --- a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract } from "../../../../../shared/utils/cache/getContract"; +import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts index 239c08778..37b670021 100644 --- a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts index 6ff5d09c2..c7f3c7d6b 100644 --- a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts @@ -1,8 +1,8 @@ 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 { getContract } from "../../../../../shared/utils/cache/getContract"; +import { queueTx } from "../../../../../shared/db/transactions/queue-tx"; +import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/addContractSubscription.ts index 05637d75f..7807b1731 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/addContractSubscription.ts @@ -3,12 +3,12 @@ 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/chain-indexers/upsert-chain-indexer"; +import { createContractSubscription } from "../../../../shared/db/contract-subscriptions/create-contract-subscription"; +import { getContractSubscriptionsUniqueChainIds } from "../../../../shared/db/contract-subscriptions/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 { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { getChain } from "../../../../shared/utils/chain"; import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; diff --git a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts index 66a5f0cb8..1d72bd12b 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/contract-event-logs/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..e825b437d 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/contract-subscriptions/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..38f308b2b 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/chain-indexers/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..e7ebfcb4a 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/contract-subscriptions/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..8822c46f0 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/contract-subscriptions/get-contract-subscriptions"; +import { getContractTransactionReceiptsByBlock } from "../../../../shared/db/contract-transaction-receipts/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..6db81d04e 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/contract-transaction-receipts/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..b9db6ec49 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/contract-transaction-receipts/get-contract-transaction-receipts"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/contract/write/write.ts b/src/server/routes/contract/write/write.ts index 3f928832f..c3ea10a25 100644 --- a/src/server/routes/contract/write/write.ts +++ b/src/server/routes/contract/write/write.ts @@ -3,9 +3,9 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prepareContractCall, resolveMethod } from "thirdweb"; import { parseAbiParams, type AbiFunction } from "thirdweb/utils"; -import { getContractV5 } from "../../../../shared/utils/cache/getContractv5"; +import { getContractV5 } from "../../../../shared/utils/cache/get-contractv5"; import { prettifyError } from "../../../../shared/utils/error"; -import { queueTransaction } from "../../../../shared/utils/transaction/queueTransation"; +import { queueTransaction } from "../../../../shared/utils/transaction/queue-transation"; import { createCustomError } from "../../../middleware/error"; import { abiArraySchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilt.ts b/src/server/routes/deploy/prebuilt.ts index 271d298b7..abb97673e 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../shared/utils/cache/get-sdk"; import { AddressSchema } from "../../schemas/address"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/edition.ts b/src/server/routes/deploy/prebuilts/edition.ts index 611437a7b..d4da4fe9f 100644 --- a/src/server/routes/deploy/prebuilts/edition.ts +++ b/src/server/routes/deploy/prebuilts/edition.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/editionDrop.ts b/src/server/routes/deploy/prebuilts/editionDrop.ts index 8ffa11299..0e264fa14 100644 --- a/src/server/routes/deploy/prebuilts/editionDrop.ts +++ b/src/server/routes/deploy/prebuilts/editionDrop.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/marketplaceV3.ts b/src/server/routes/deploy/prebuilts/marketplaceV3.ts index 8d70769a9..a087d7ca0 100644 --- a/src/server/routes/deploy/prebuilts/marketplaceV3.ts +++ b/src/server/routes/deploy/prebuilts/marketplaceV3.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/multiwrap.ts b/src/server/routes/deploy/prebuilts/multiwrap.ts index beb778bda..48c2e0406 100644 --- a/src/server/routes/deploy/prebuilts/multiwrap.ts +++ b/src/server/routes/deploy/prebuilts/multiwrap.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/nftCollection.ts b/src/server/routes/deploy/prebuilts/nftCollection.ts index d12c2ec63..4856e9c79 100644 --- a/src/server/routes/deploy/prebuilts/nftCollection.ts +++ b/src/server/routes/deploy/prebuilts/nftCollection.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/nftDrop.ts b/src/server/routes/deploy/prebuilts/nftDrop.ts index 19ca2a2f2..71b3b0ebf 100644 --- a/src/server/routes/deploy/prebuilts/nftDrop.ts +++ b/src/server/routes/deploy/prebuilts/nftDrop.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/pack.ts b/src/server/routes/deploy/prebuilts/pack.ts index 9e5eedbec..e65685990 100644 --- a/src/server/routes/deploy/prebuilts/pack.ts +++ b/src/server/routes/deploy/prebuilts/pack.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/signatureDrop.ts b/src/server/routes/deploy/prebuilts/signatureDrop.ts index f7a4a6290..05bb9c0a9 100644 --- a/src/server/routes/deploy/prebuilts/signatureDrop.ts +++ b/src/server/routes/deploy/prebuilts/signatureDrop.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/split.ts b/src/server/routes/deploy/prebuilts/split.ts index 8184c0699..b0e1f15c9 100644 --- a/src/server/routes/deploy/prebuilts/split.ts +++ b/src/server/routes/deploy/prebuilts/split.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/token.ts b/src/server/routes/deploy/prebuilts/token.ts index 50fde94fb..ae2ffbb7e 100644 --- a/src/server/routes/deploy/prebuilts/token.ts +++ b/src/server/routes/deploy/prebuilts/token.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/tokenDrop.ts b/src/server/routes/deploy/prebuilts/tokenDrop.ts index 73f55b682..b14b9f9cd 100644 --- a/src/server/routes/deploy/prebuilts/tokenDrop.ts +++ b/src/server/routes/deploy/prebuilts/tokenDrop.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/prebuilts/vote.ts b/src/server/routes/deploy/prebuilts/vote.ts index fce36471f..292a1c151 100644 --- a/src/server/routes/deploy/prebuilts/vote.ts +++ b/src/server/routes/deploy/prebuilts/vote.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { commonContractSchema, diff --git a/src/server/routes/deploy/published.ts b/src/server/routes/deploy/published.ts index 13a313541..41bcb0f30 100644 --- a/src/server/routes/deploy/published.ts +++ b/src/server/routes/deploy/published.ts @@ -2,8 +2,8 @@ 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 { getSdk } from "../../../shared/utils/cache/getSdk"; +import { queueTx } from "../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../shared/utils/cache/get-sdk"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { publishedDeployParamSchema, diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index 604a0774d..a624ce74d 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -9,9 +9,9 @@ import { ForwarderAbiEIP712ChainlessDomain, NativeMetaTransaction, } from "../../../shared/schemas/relayer"; -import { getRelayerById } from "../../../shared/db/relayer/getRelayerById"; -import { queueTx } from "../../../shared/db/transactions/queueTx"; -import { getSdk } from "../../../shared/utils/cache/getSdk"; +import { getRelayerById } from "../../../shared/db/relayer/get-relayer-by-id"; +import { queueTx } from "../../../shared/db/transactions/queue-tx"; +import { getSdk } from "../../../shared/utils/cache/get-sdk"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema, diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index cb49beb59..cd06f9354 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../shared/db/transactions/db"; import { getBlockNumberish } from "../../../shared/utils/block"; -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/get-config"; import { getChain } from "../../../shared/utils/chain"; import { msSince } from "../../../shared/utils/date"; -import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancelTransaction"; +import { sendCancellationTransaction } from "../../../shared/utils/transaction/cancel-transaction"; import type { CancelledTransaction } from "../../../shared/utils/transaction/types"; import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; import { reportUsage } from "../../../shared/utils/usage"; diff --git a/src/server/routes/transaction/retry.ts b/src/server/routes/transaction/retry.ts index affd9a88c..21743f725 100644 --- a/src/server/routes/transaction/retry.ts +++ b/src/server/routes/transaction/retry.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../shared/db/transactions/db"; -import { maybeBigInt } from "../../../shared/utils/primitiveTypes"; +import { maybeBigInt } from "../../../shared/utils/primitive-types"; import type { SentTransaction } from "../../../shared/utils/transaction/types"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/transaction/sync-retry.ts b/src/server/routes/transaction/sync-retry.ts index e6ef887c4..b0b45b8a6 100644 --- a/src/server/routes/transaction/sync-retry.ts +++ b/src/server/routes/transaction/sync-retry.ts @@ -10,7 +10,7 @@ import { getChain } from "../../../shared/utils/chain"; import { getChecksumAddress, maybeBigInt, -} from "../../../shared/utils/primitiveTypes"; +} from "../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../shared/utils/sdk"; import type { SentTransaction } from "../../../shared/utils/transaction/types"; import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; 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/transactionOverrides.ts b/src/server/utils/transactionOverrides.ts index 83f728024..d7c8e9fcf 100644 --- a/src/server/utils/transactionOverrides.ts +++ b/src/server/utils/transactionOverrides.ts @@ -1,5 +1,5 @@ import type { Static } from "@sinclair/typebox"; -import { maybeBigInt } from "../../shared/utils/primitiveTypes"; +import { maybeBigInt } from "../../shared/utils/primitive-types"; import type { InsertedTransaction } from "../../shared/utils/transaction/types"; import type { txOverridesSchema, 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/fetchAwsKmsWalletParams.ts b/src/server/utils/wallets/fetchAwsKmsWalletParams.ts index eea36e9ca..0b0f46ef5 100644 --- a/src/server/utils/wallets/fetchAwsKmsWalletParams.ts +++ b/src/server/utils/wallets/fetchAwsKmsWalletParams.ts @@ -1,4 +1,4 @@ -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/get-config"; export type AwsKmsWalletParams = { awsAccessKeyId: string; diff --git a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts b/src/server/utils/wallets/fetchGcpKmsWalletParams.ts index a5f6de90b..4d2fc84da 100644 --- a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts +++ b/src/server/utils/wallets/fetchGcpKmsWalletParams.ts @@ -1,4 +1,4 @@ -import { getConfig } from "../../../shared/utils/cache/getConfig"; +import { getConfig } from "../../../shared/utils/cache/get-config"; export type GcpKmsWalletParams = { gcpApplicationCredentialEmail: string; 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/getSmartWallet.ts b/src/server/utils/wallets/getSmartWallet.ts index 67db9f1d1..1b512361d 100644 --- a/src/server/utils/wallets/getSmartWallet.ts +++ b/src/server/utils/wallets/getSmartWallet.ts @@ -1,5 +1,5 @@ import { SmartWallet, type EVMWallet } from "@thirdweb-dev/wallets"; -import { getContract } from "../../../shared/utils/cache/getContract"; +import { getContract } from "../../../shared/utils/cache/get-contract"; import { env } from "../../../shared/utils/env"; import { redis } from "../../../shared/utils/redis/redis"; 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..ee46e3a3b 100644 --- a/src/shared/db/configuration/getConfiguration.ts +++ b/src/shared/db/configuration/get-configuration.ts @@ -10,12 +10,12 @@ import type { } from "../../schemas/config"; import { WalletType } from "../../schemas/wallet"; import { mandatoryAllowedCorsUrls } from "../../../server/utils/cors-urls"; -import type { networkResponseSchema } from "../../utils/cache/getSdk"; +import type { networkResponseSchema } from "../../utils/cache/get-sdk"; 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 99% rename from src/shared/db/transactions/queueTx.ts rename to src/shared/db/transactions/queue-tx.ts index 4c12eeae0..181142fa8 100644 --- a/src/shared/db/transactions/queueTx.ts +++ b/src/shared/db/transactions/queue-tx.ts @@ -2,8 +2,8 @@ import type { DeployTransaction, Transaction } from "@thirdweb-dev/sdk"; import type { ERC4337EthersSigner } from "@thirdweb-dev/wallets/dist/declarations/src/evm/connectors/smart-wallet/lib/erc4337-signer"; import { ZERO_ADDRESS, type Address } from "thirdweb"; import type { ContractExtension } from "../../schemas/extension"; -import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; -import { insertTransaction } from "../../utils/transaction/insertTransaction"; +import { maybeBigInt, normalizeAddress } from "../../utils/primitive-types"; +import { insertTransaction } from "../../utils/transaction/insert-transaction"; import type { InsertedTransaction } from "../../utils/transaction/types"; import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; 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 99% rename from src/shared/db/wallets/getWalletDetails.ts rename to src/shared/db/wallets/get-wallet-details.ts index fcbc8e9d6..eaa475143 100644 --- a/src/shared/db/wallets/getWalletDetails.ts +++ b/src/shared/db/wallets/get-wallet-details.ts @@ -1,7 +1,7 @@ import { getAddress } from "thirdweb"; import { z } from "zod"; import type { PrismaTransaction } from "../../schemas/prisma"; -import { getConfig } from "../../utils/cache/getConfig"; +import { getConfig } from "../../utils/cache/get-config"; import { decrypt } from "../../utils/crypto"; import { env } from "../../utils/env"; import { getPrismaWithPostgresTx } from "../client"; diff --git a/src/shared/db/wallets/nonceMap.ts b/src/shared/db/wallets/nonce-map.ts similarity index 97% rename from src/shared/db/wallets/nonceMap.ts rename to src/shared/db/wallets/nonce-map.ts index aac67c2be..5c8bab836 100644 --- a/src/shared/db/wallets/nonceMap.ts +++ b/src/shared/db/wallets/nonce-map.ts @@ -1,6 +1,6 @@ import type { Address } from "thirdweb"; import { env } from "../../utils/env"; -import { normalizeAddress } from "../../utils/primitiveTypes"; +import { normalizeAddress } from "../../utils/primitive-types"; import { redis } from "../../utils/redis/redis"; /** 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 98% rename from src/shared/db/wallets/walletNonce.ts rename to src/shared/db/wallets/wallet-nonce.ts index 1d7124bd8..c730533ce 100644 --- a/src/shared/db/wallets/walletNonce.ts +++ b/src/shared/db/wallets/wallet-nonce.ts @@ -6,10 +6,10 @@ import { } from "thirdweb"; import { getChain } from "../../utils/chain"; import { logger } from "../../utils/logger"; -import { normalizeAddress } from "../../utils/primitiveTypes"; +import { normalizeAddress } from "../../utils/primitive-types"; 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..72126e9e7 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"; @@ -15,7 +15,7 @@ import { encryptedJsonToAccount, getLocalWalletAccount, } from "../../server/utils/wallets/getLocalWallet"; -import { getSmartWalletV5 } from "./cache/getSmartWalletV5"; +import { getSmartWalletV5 } from "./cache/get-smart-wallet-v5"; import { getChain } from "./chain"; import { thirdwebClient } from "./sdk"; diff --git a/src/shared/utils/cache/accessToken.ts b/src/shared/utils/cache/access-token.ts similarity index 91% rename from src/shared/utils/cache/accessToken.ts rename to src/shared/utils/cache/access-token.ts index 992e25ee9..139f16013 100644 --- a/src/shared/utils/cache/accessToken.ts +++ b/src/shared/utils/cache/access-token.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/auth-wallet.ts similarity index 95% rename from src/shared/utils/cache/authWallet.ts rename to src/shared/utils/cache/auth-wallet.ts index 8af853198..0da2eb19e 100644 --- a/src/shared/utils/cache/authWallet.ts +++ b/src/shared/utils/cache/auth-wallet.ts @@ -1,8 +1,8 @@ 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"; +import { getConfig } from "./get-config"; let authWallet: LocalWallet | undefined; diff --git a/src/shared/utils/cache/clearCache.ts b/src/shared/utils/cache/clear-cache.ts similarity index 58% rename from src/shared/utils/cache/clearCache.ts rename to src/shared/utils/cache/clear-cache.ts index 870561b26..3a8cc423d 100644 --- a/src/shared/utils/cache/clearCache.ts +++ b/src/shared/utils/cache/clear-cache.ts @@ -1,9 +1,9 @@ import type { env } from "../env"; -import { accessTokenCache } from "./accessToken"; -import { invalidateConfig } from "./getConfig"; -import { sdkCache } from "./getSdk"; -import { walletsCache } from "./getWallet"; -import { webhookCache } from "./getWebhook"; +import { accessTokenCache } from "./access-token"; +import { invalidateConfig } from "./get-config"; +import { sdkCache } from "./get-sdk"; +import { walletsCache } from "./get-wallet"; +import { webhookCache } from "./get-webhook"; import { keypairCache } from "./keypair"; export const clearCache = async ( diff --git a/src/shared/utils/cache/getConfig.ts b/src/shared/utils/cache/get-config.ts similarity index 82% rename from src/shared/utils/cache/getConfig.ts rename to src/shared/utils/cache/get-config.ts index f18937576..f88dd75c1 100644 --- a/src/shared/utils/cache/getConfig.ts +++ b/src/shared/utils/cache/get-config.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/getContract.ts b/src/shared/utils/cache/get-contract.ts similarity index 96% rename from src/shared/utils/cache/getContract.ts rename to src/shared/utils/cache/get-contract.ts index b9b4dcb51..c590434d0 100644 --- a/src/shared/utils/cache/getContract.ts +++ b/src/shared/utils/cache/get-contract.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import { StatusCodes } from "http-status-codes"; import { createCustomError } from "../../../server/middleware/error"; import { abiSchema } from "../../../server/schemas/contract"; -import { getSdk } from "./getSdk"; +import { getSdk } from "./get-sdk"; const abiArraySchema = Type.Array(abiSchema); diff --git a/src/shared/utils/cache/getContractv5.ts b/src/shared/utils/cache/get-contractv5.ts similarity index 100% rename from src/shared/utils/cache/getContractv5.ts rename to src/shared/utils/cache/get-contractv5.ts diff --git a/src/shared/utils/cache/getSdk.ts b/src/shared/utils/cache/get-sdk.ts similarity index 98% rename from src/shared/utils/cache/getSdk.ts rename to src/shared/utils/cache/get-sdk.ts index f15781715..92f80472b 100644 --- a/src/shared/utils/cache/getSdk.ts +++ b/src/shared/utils/cache/get-sdk.ts @@ -5,7 +5,7 @@ import { getChainMetadata } from "thirdweb/chains"; import { badChainError } from "../../../server/middleware/error"; import { getChain } from "../chain"; import { env } from "../env"; -import { getWallet } from "./getWallet"; +import { getWallet } from "./get-wallet"; export const sdkCache = new LRUMap(2048); diff --git a/src/shared/utils/cache/getSmartWalletV5.ts b/src/shared/utils/cache/get-smart-wallet-v5.ts similarity index 100% rename from src/shared/utils/cache/getSmartWalletV5.ts rename to src/shared/utils/cache/get-smart-wallet-v5.ts diff --git a/src/shared/utils/cache/getWallet.ts b/src/shared/utils/cache/get-wallet.ts similarity index 99% rename from src/shared/utils/cache/getWallet.ts rename to src/shared/utils/cache/get-wallet.ts index 520cf924f..7ad7cdecb 100644 --- a/src/shared/utils/cache/getWallet.ts +++ b/src/shared/utils/cache/get-wallet.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/get-webhook.ts similarity index 90% rename from src/shared/utils/cache/getWebhook.ts rename to src/shared/utils/cache/get-webhook.ts index 1ed9df187..51326d569 100644 --- a/src/shared/utils/cache/getWebhook.ts +++ b/src/shared/utils/cache/get-webhook.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/chain.ts b/src/shared/utils/chain.ts index 0b15e27cd..c0c581dad 100644 --- a/src/shared/utils/chain.ts +++ b/src/shared/utils/chain.ts @@ -1,5 +1,5 @@ import { defineChain, type Chain } from "thirdweb"; -import { getConfig } from "./cache/getConfig"; +import { getConfig } from "./cache/get-config"; /** * Get the chain for thirdweb v5 SDK. Supports chain overrides. diff --git a/src/shared/utils/cron/clearCacheCron.ts b/src/shared/utils/cron/clear-cache-cron.ts similarity index 80% rename from src/shared/utils/cron/clearCacheCron.ts rename to src/shared/utils/cron/clear-cache-cron.ts index c6bf0f0b3..71c620862 100644 --- a/src/shared/utils/cron/clearCacheCron.ts +++ b/src/shared/utils/cron/clear-cache-cron.ts @@ -1,6 +1,6 @@ import cron from "node-cron"; -import { clearCache } from "../cache/clearCache"; -import { getConfig } from "../cache/getConfig"; +import { clearCache } from "../cache/clear-cache"; +import { getConfig } from "../cache/get-config"; import { env } from "../env"; let task: cron.ScheduledTask; diff --git a/src/shared/utils/cron/isValidCron.ts b/src/shared/utils/cron/is-valid-cron.ts similarity index 100% rename from src/shared/utils/cron/isValidCron.ts rename to src/shared/utils/cron/is-valid-cron.ts diff --git a/src/shared/utils/indexer/getBlockTime.ts b/src/shared/utils/indexer/get-block-time.ts similarity index 100% rename from src/shared/utils/indexer/getBlockTime.ts rename to src/shared/utils/indexer/get-block-time.ts diff --git a/src/shared/utils/primitiveTypes.ts b/src/shared/utils/primitive-types.ts similarity index 100% rename from src/shared/utils/primitiveTypes.ts rename to src/shared/utils/primitive-types.ts 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/shared/utils/transaction/cancelTransaction.ts b/src/shared/utils/transaction/cancel-transaction.ts similarity index 95% rename from src/shared/utils/transaction/cancelTransaction.ts rename to src/shared/utils/transaction/cancel-transaction.ts index 29ee5fc66..d2dda52c6 100644 --- a/src/shared/utils/transaction/cancelTransaction.ts +++ b/src/shared/utils/transaction/cancel-transaction.ts @@ -1,7 +1,7 @@ import { Address, toSerializableTransaction } from "thirdweb"; import { getAccount } from "../account"; import { getChain } from "../chain"; -import { getChecksumAddress } from "../primitiveTypes"; +import { getChecksumAddress } from "../primitive-types"; import { thirdwebClient } from "../sdk"; interface CancellableTransaction { diff --git a/src/shared/utils/transaction/insertTransaction.ts b/src/shared/utils/transaction/insert-transaction.ts similarity index 96% rename from src/shared/utils/transaction/insertTransaction.ts rename to src/shared/utils/transaction/insert-transaction.ts index 5d4f33da4..69737784f 100644 --- a/src/shared/utils/transaction/insertTransaction.ts +++ b/src/shared/utils/transaction/insert-transaction.ts @@ -5,14 +5,14 @@ import { getWalletDetails, isSmartBackendWallet, type ParsedWalletDetails, -} from "../../../shared/db/wallets/getWalletDetails"; +} from "../../../shared/db/wallets/get-wallet-details"; import { doesChainSupportService } from "../../lib/chain/chain-capabilities"; import { createCustomError } from "../../../server/middleware/error"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; -import { getChecksumAddress } from "../primitiveTypes"; +import { getChecksumAddress } from "../primitive-types"; import { recordMetrics } from "../prometheus"; import { reportUsage } from "../usage"; -import { doSimulateTransaction } from "./simulateQueuedTransaction"; +import { doSimulateTransaction } from "./simulate-queued-transaction"; import type { InsertedTransaction, QueuedTransaction } from "./types"; interface InsertTransactionData { diff --git a/src/shared/utils/transaction/queueTransation.ts b/src/shared/utils/transaction/queue-transation.ts similarity index 97% rename from src/shared/utils/transaction/queueTransation.ts rename to src/shared/utils/transaction/queue-transation.ts index e883a83aa..c19ddbc30 100644 --- a/src/shared/utils/transaction/queueTransation.ts +++ b/src/shared/utils/transaction/queue-transation.ts @@ -11,7 +11,7 @@ import { createCustomError } from "../../../server/middleware/error"; import type { txOverridesWithValueSchema } from "../../../server/schemas/txOverrides"; import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; import { prettifyError } from "../error"; -import { insertTransaction } from "./insertTransaction"; +import { insertTransaction } from "./insert-transaction"; import type { InsertedTransaction } from "./types"; export type QueuedTransactionParams = { diff --git a/src/shared/utils/transaction/simulateQueuedTransaction.ts b/src/shared/utils/transaction/simulate-queued-transaction.ts similarity index 96% rename from src/shared/utils/transaction/simulateQueuedTransaction.ts rename to src/shared/utils/transaction/simulate-queued-transaction.ts index 5b94db96f..2a39a8575 100644 --- a/src/shared/utils/transaction/simulateQueuedTransaction.ts +++ b/src/shared/utils/transaction/simulate-queued-transaction.ts @@ -6,7 +6,7 @@ import { import { stringify } from "thirdweb/utils"; import type { Account } from "thirdweb/wallets"; import { getAccount } from "../account"; -import { getSmartWalletV5 } from "../cache/getSmartWalletV5"; +import { getSmartWalletV5 } from "../cache/get-smart-wallet-v5"; import { getChain } from "../chain"; import { thirdwebClient } from "../sdk"; import type { AnyTransaction } from "./types"; diff --git a/src/worker/indexers/chainIndexerRegistry.ts b/src/worker/indexers/chainIndexerRegistry.ts index 760b556f1..d8d540535 100644 --- a/src/worker/indexers/chainIndexerRegistry.ts +++ b/src/worker/indexers/chainIndexerRegistry.ts @@ -1,5 +1,5 @@ import cron from "node-cron"; -import { getBlockTimeSeconds } from "../../shared/utils/indexer/getBlockTime"; +import { getBlockTimeSeconds } from "../../shared/utils/indexer/get-block-time"; import { logger } from "../../shared/utils/logger"; import { handleContractSubscriptions } from "../tasks/chainIndexer"; diff --git a/src/worker/listeners/chainIndexerListener.ts b/src/worker/listeners/chainIndexerListener.ts index 186aee895..a9f08a55f 100644 --- a/src/worker/listeners/chainIndexerListener.ts +++ b/src/worker/listeners/chainIndexerListener.ts @@ -1,5 +1,5 @@ import cron from "node-cron"; -import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getConfig } from "../../shared/utils/cache/get-config"; import { logger } from "../../shared/utils/logger"; import { manageChainIndexers } from "../tasks/manageChainIndexers"; diff --git a/src/worker/listeners/configListener.ts b/src/worker/listeners/configListener.ts index 62594280d..fd4aa331d 100644 --- a/src/worker/listeners/configListener.ts +++ b/src/worker/listeners/configListener.ts @@ -1,6 +1,6 @@ import { knex } from "../../shared/db/client"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { clearCacheCron } from "../../shared/utils/cron/clearCacheCron"; +import { getConfig } from "../../shared/utils/cache/get-config"; +import { clearCacheCron } from "../../shared/utils/cron/clear-cache-cron"; import { logger } from "../../shared/utils/logger"; import { chainIndexerListener } from "./chainIndexerListener"; diff --git a/src/worker/listeners/webhookListener.ts b/src/worker/listeners/webhookListener.ts index d1ab64e18..fd1197cb2 100644 --- a/src/worker/listeners/webhookListener.ts +++ b/src/worker/listeners/webhookListener.ts @@ -1,5 +1,5 @@ import { knex } from "../../shared/db/client"; -import { webhookCache } from "../../shared/utils/cache/getWebhook"; +import { webhookCache } from "../../shared/utils/cache/get-webhook"; import { logger } from "../../shared/utils/logger"; export const newWebhooksListener = async (): Promise => { diff --git a/src/worker/queues/processEventLogsQueue.ts b/src/worker/queues/processEventLogsQueue.ts index de3c97a0d..499a73940 100644 --- a/src/worker/queues/processEventLogsQueue.ts +++ b/src/worker/queues/processEventLogsQueue.ts @@ -1,7 +1,7 @@ import { Queue } from "bullmq"; import SuperJSON from "superjson"; import type { Address } from "thirdweb"; -import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getConfig } from "../../shared/utils/cache/get-config"; import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; diff --git a/src/worker/queues/processTransactionReceiptsQueue.ts b/src/worker/queues/processTransactionReceiptsQueue.ts index 6ee7c7557..946e1eb1a 100644 --- a/src/worker/queues/processTransactionReceiptsQueue.ts +++ b/src/worker/queues/processTransactionReceiptsQueue.ts @@ -1,7 +1,7 @@ import { Queue } from "bullmq"; import superjson from "superjson"; import type { Address } from "thirdweb"; -import { getConfig } from "../../shared/utils/cache/getConfig"; +import { getConfig } from "../../shared/utils/cache/get-config"; import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; diff --git a/src/worker/queues/sendWebhookQueue.ts b/src/worker/queues/sendWebhookQueue.ts index a39bb7468..273e2827e 100644 --- a/src/worker/queues/sendWebhookQueue.ts +++ b/src/worker/queues/sendWebhookQueue.ts @@ -9,7 +9,7 @@ import { WebhooksEventTypes, type BackendWalletBalanceWebhookParams, } from "../../shared/schemas/webhooks"; -import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { getWebhooksByEventType } from "../../shared/utils/cache/get-webhook"; import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancelRecycledNoncesWorker.ts index 2fa58212a..0ac34b2a1 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancelRecycledNoncesWorker.ts @@ -1,10 +1,10 @@ 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"; -import { sendCancellationTransaction } from "../../shared/utils/transaction/cancelTransaction"; +import { sendCancellationTransaction } from "../../shared/utils/transaction/cancel-transaction"; import { CancelRecycledNoncesQueue } from "../queues/cancelRecycledNoncesQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chainIndexer.ts index 41bf92288..ee29f88d2 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/chain-indexers/get-chain-indexer"; +import { upsertChainIndexer } from "../../shared/db/chain-indexers/upsert-chain-indexer"; import { prisma } from "../../shared/db/client"; -import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getContractSubscriptionsByChainId } from "../../shared/db/contract-subscriptions/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..ef13d227f 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/contract-subscriptions/get-contract-subscriptions"; import { INDEXER_REGISTRY, addChainIndexer, diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index a9d09edc5..11440400c 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -14,15 +14,15 @@ import { TransactionDB } from "../../shared/db/transactions/db"; import { recycleNonce, removeSentNonce, -} from "../../shared/db/wallets/walletNonce"; +} from "../../shared/db/wallets/wallet-nonce"; import { getReceiptForEOATransaction, getReceiptForUserOp, } from "../../shared/lib/transaction/get-transaction-receipt"; import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; import { getBlockNumberish } from "../../shared/utils/block"; -import { getConfig } from "../../shared/utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../shared/utils/cache/getWebhook"; +import { getConfig } from "../../shared/utils/cache/get-config"; +import { getWebhooksByEventType } from "../../shared/utils/cache/get-webhook"; import { getChain } from "../../shared/utils/chain"; import { msSince } from "../../shared/utils/date"; import { env } from "../../shared/utils/env"; 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..da4dffacc 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -5,8 +5,8 @@ import { isSentNonce, recycleNonce, splitSentNoncesKey, -} from "../../shared/db/wallets/walletNonce"; -import { getConfig } from "../../shared/utils/cache/getConfig"; +} from "../../shared/db/wallets/wallet-nonce"; +import { getConfig } from "../../shared/utils/cache/get-config"; import { getChain } from "../../shared/utils/chain"; import { prettifyError } from "../../shared/utils/error"; import { logger } from "../../shared/utils/logger"; diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index b1fd0c357..3b56d9621 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -15,12 +15,12 @@ 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/contract-event-logs/create-contract-event-logs"; +import { getContractSubscriptionsByChainId } from "../../shared/db/contract-subscriptions/get-contract-subscriptions"; import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; import { getChain } from "../../shared/utils/chain"; import { logger } from "../../shared/utils/logger"; -import { normalizeAddress } from "../../shared/utils/primitiveTypes"; +import { normalizeAddress } from "../../shared/utils/primitive-types"; import { redis } from "../../shared/utils/redis/redis"; import { thirdwebClient } from "../../shared/utils/sdk"; import { diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index 5bfb4e5a0..620b316f2 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -12,11 +12,11 @@ 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/contract-transaction-receipts/create-contract-transaction-receipts"; import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; import { getChain } from "../../shared/utils/chain"; import { logger } from "../../shared/utils/logger"; -import { normalizeAddress } from "../../shared/utils/primitiveTypes"; +import { normalizeAddress } from "../../shared/utils/primitive-types"; import { redis } from "../../shared/utils/redis/redis"; import { thirdwebClient } from "../../shared/utils/sdk"; import { 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..8c662f7e7 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, @@ -40,7 +40,7 @@ import { wrapError, } from "../../shared/utils/error"; import { BigIntMath } from "../../shared/utils/math"; -import { getChecksumAddress } from "../../shared/utils/primitiveTypes"; +import { getChecksumAddress } from "../../shared/utils/primitive-types"; import { recordMetrics } from "../../shared/utils/prometheus"; import { redis } from "../../shared/utils/redis/redis"; import { thirdwebClient } from "../../shared/utils/sdk"; diff --git a/tests/unit/auth.test.ts b/tests/unit/auth.test.ts index 7ea7ab5f2..c7597e08d 100644 --- a/tests/unit/auth.test.ts +++ b/tests/unit/auth.test.ts @@ -3,17 +3,17 @@ 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 { THIRDWEB_DASHBOARD_ISSUER, handleSiwe, } from "../../src/shared/utils/auth"; -import { getAccessToken } from "../../src/shared/utils/cache/accessToken"; -import { getAuthWallet } from "../../src/shared/utils/cache/authWallet"; -import { getConfig } from "../../src/shared/utils/cache/getConfig"; -import { getWebhooksByEventType } from "../../src/shared/utils/cache/getWebhook"; +import { getAccessToken } from "../../src/shared/utils/cache/access-token"; +import { getAuthWallet } from "../../src/shared/utils/cache/auth-wallet"; +import { getConfig } from "../../src/shared/utils/cache/get-config"; +import { getWebhooksByEventType } from "../../src/shared/utils/cache/get-webhook"; import { getKeypair } from "../../src/shared/utils/cache/keypair"; import { sendWebhookRequest } from "../../src/shared/utils/webhook"; import { Permission } from "../../src/shared/schemas"; diff --git a/tests/unit/chain.test.ts b/tests/unit/chain.test.ts index dff36db94..9db0fca24 100644 --- a/tests/unit/chain.test.ts +++ b/tests/unit/chain.test.ts @@ -4,7 +4,7 @@ import { } from "@thirdweb-dev/chains"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { getChainIdFromChain } from "../../src/server/utils/chain"; -import { getConfig } from "../../src/shared/utils/cache/getConfig"; +import { getConfig } from "../../src/shared/utils/cache/get-config"; // Mock the external dependencies vi.mock("../utils/cache/getConfig"); From 55dbc58c0cb101ee17518f85b20d34791ab929a5 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 16:33:27 +0800 Subject: [PATCH 36/44] chore(refactor): kebab-case /worker folder (#804) * chore(refactor): kebab-case /shared/db * all shared folder * chore(refactor): Rename /worker folder to kebab-case * chore(refactor): kebab-case /server folder --- renamer.ts | 2 +- src/index.ts | 16 ++-- src/server/index.ts | 12 +-- ...ateTxListener.ts => update-tx-listener.ts} | 0 .../{adminRoutes.ts => admin-routes.ts} | 18 ++-- src/server/middleware/auth.ts | 4 +- src/server/middleware/cors.ts | 2 +- .../{engineMode.ts => engine-mode.ts} | 0 src/server/middleware/logs.ts | 4 +- .../middleware/{openApi.ts => open-api.ts} | 0 .../{rateLimit.ts => rate-limit.ts} | 2 +- ...securityHeaders.ts => security-headers.ts} | 0 src/server/routes/admin/nonces.ts | 2 +- src/server/routes/admin/transaction.ts | 6 +- .../routes/auth/access-tokens/create.ts | 4 +- .../access-tokens/{getAll.ts => get-all.ts} | 2 +- .../routes/auth/access-tokens/revoke.ts | 2 +- .../routes/auth/access-tokens/update.ts | 2 +- src/server/routes/auth/keypair/add.ts | 2 +- src/server/routes/auth/keypair/list.ts | 2 +- src/server/routes/auth/keypair/remove.ts | 2 +- .../permissions/{getAll.ts => get-all.ts} | 2 +- src/server/routes/auth/permissions/grant.ts | 2 +- src/server/routes/auth/permissions/revoke.ts | 2 +- .../routes/backend-wallet/cancel-nonces.ts | 2 +- src/server/routes/backend-wallet/create.ts | 10 +- .../backend-wallet/{getAll.ts => get-all.ts} | 2 +- .../{getBalance.ts => get-balance.ts} | 2 +- .../{getNonce.ts => get-nonce.ts} | 2 +- ...yNonce.ts => get-transactions-by-nonce.ts} | 2 +- ...getTransactions.ts => get-transactions.ts} | 2 +- src/server/routes/backend-wallet/import.ts | 10 +- src/server/routes/backend-wallet/remove.ts | 2 +- .../routes/backend-wallet/reset-nonces.ts | 2 +- ...tionBatch.ts => send-transaction-batch.ts} | 6 +- ...sendTransaction.ts => send-transaction.ts} | 6 +- .../{signMessage.ts => sign-message.ts} | 2 +- ...signTransaction.ts => sign-transaction.ts} | 2 +- .../{signTypedData.ts => sign-typed-data.ts} | 2 +- ...Transaction.ts => simulate-transaction.ts} | 2 +- src/server/routes/backend-wallet/transfer.ts | 6 +- src/server/routes/backend-wallet/update.ts | 2 +- src/server/routes/backend-wallet/withdraw.ts | 6 +- .../routes/chain/{getAll.ts => get-all.ts} | 2 +- src/server/routes/chain/get.ts | 2 +- src/server/routes/configuration/auth/get.ts | 2 +- .../routes/configuration/auth/update.ts | 2 +- .../backend-wallet-balance/get.ts | 2 +- .../backend-wallet-balance/update.ts | 2 +- src/server/routes/configuration/cache/get.ts | 2 +- .../routes/configuration/cache/update.ts | 2 +- src/server/routes/configuration/chains/get.ts | 2 +- .../routes/configuration/chains/update.ts | 2 +- .../contract-subscriptions/get.ts | 2 +- .../contract-subscriptions/update.ts | 2 +- src/server/routes/configuration/cors/add.ts | 2 +- src/server/routes/configuration/cors/get.ts | 2 +- .../routes/configuration/cors/remove.ts | 2 +- src/server/routes/configuration/cors/set.ts | 2 +- src/server/routes/configuration/ip/get.ts | 2 +- src/server/routes/configuration/ip/set.ts | 2 +- .../routes/configuration/transactions/get.ts | 2 +- .../configuration/transactions/update.ts | 2 +- .../routes/configuration/wallets/get.ts | 2 +- .../routes/configuration/wallets/update.ts | 2 +- .../{getAllEvents.ts => get-all-events.ts} | 2 +- ...ventLogs.ts => get-contract-event-logs.ts} | 2 +- ...tamp.ts => get-event-logs-by-timestamp.ts} | 4 +- .../events/{getEvents.ts => get-events.ts} | 2 +- ...ateEventLogs.ts => paginate-event-logs.ts} | 4 +- .../index.ts | 10 +- .../read/get-all-accounts.ts} | 2 +- .../read/get-associated-accounts.ts} | 2 +- .../read/is-account-deployed.ts} | 2 +- .../read/predict-account-address.ts} | 2 +- .../write/create-account.ts} | 4 +- .../contract/extensions/account/index.ts | 14 +-- .../{getAllAdmins.ts => get-all-admins.ts} | 2 +- ...{getAllSessions.ts => get-all-sessions.ts} | 2 +- .../write/{grantAdmin.ts => grant-admin.ts} | 4 +- .../{grantSession.ts => grant-session.ts} | 4 +- .../write/{revokeAdmin.ts => revoke-admin.ts} | 4 +- .../{revokeSession.ts => revoke-session.ts} | 4 +- .../{updateSession.ts => update-session.ts} | 4 +- .../contract/extensions/erc1155/index.ts | 50 +++++----- .../read/{balanceOf.ts => balance-of.ts} | 2 +- .../read/{canClaim.ts => can-claim.ts} | 2 +- ...ions.ts => get-active-claim-conditions.ts} | 4 +- ...ditions.ts => get-all-claim-conditions.ts} | 4 +- .../erc1155/read/{getAll.ts => get-all.ts} | 2 +- ....ts => get-claim-ineligibility-reasons.ts} | 2 +- ...ClaimerProofs.ts => get-claimer-proofs.ts} | 4 +- .../read/{getOwned.ts => get-owned.ts} | 2 +- .../contract/extensions/erc1155/read/get.ts | 2 +- .../read/{isApproved.ts => is-approved.ts} | 2 +- ...atureGenerate.ts => signature-generate.ts} | 4 +- .../read/{totalCount.ts => total-count.ts} | 2 +- .../read/{totalSupply.ts => total-supply.ts} | 2 +- .../extensions/erc1155/write/airdrop.ts | 4 +- .../write/{burnBatch.ts => burn-batch.ts} | 4 +- .../contract/extensions/erc1155/write/burn.ts | 4 +- .../erc1155/write/{claimTo.ts => claim-to.ts} | 4 +- .../write/{lazyMint.ts => lazy-mint.ts} | 4 +- ...pplyTo.ts => mint-additional-supply-to.ts} | 4 +- .../{mintBatchTo.ts => mint-batch-to.ts} | 4 +- .../erc1155/write/{mintTo.ts => mint-to.ts} | 4 +- ...rovalForAll.ts => set-approval-for-all.ts} | 4 +- ...tions.ts => set-batch-claim-conditions.ts} | 6 +- ...mConditions.ts => set-claim-conditions.ts} | 6 +- .../{signatureMint.ts => signature-mint.ts} | 4 +- .../{transferFrom.ts => transfer-from.ts} | 4 +- .../extensions/erc1155/write/transfer.ts | 4 +- ...nditions.ts => update-claim-conditions.ts} | 6 +- ...enMetadata.ts => update-token-metadata.ts} | 4 +- .../routes/contract/extensions/erc20/index.ts | 36 +++---- .../read/{allowanceOf.ts => allowance-of.ts} | 2 +- .../read/{balanceOf.ts => balance-of.ts} | 2 +- .../erc20/read/{canClaim.ts => can-claim.ts} | 2 +- ...ions.ts => get-active-claim-conditions.ts} | 4 +- ...ditions.ts => get-all-claim-conditions.ts} | 4 +- ....ts => get-claim-ineligibility-reasons.ts} | 2 +- ...ClaimerProofs.ts => get-claimer-proofs.ts} | 4 +- .../contract/extensions/erc20/read/get.ts | 2 +- ...atureGenerate.ts => signature-generate.ts} | 4 +- .../read/{totalSupply.ts => total-supply.ts} | 2 +- .../erc20/write/{burnFrom.ts => burn-from.ts} | 4 +- .../contract/extensions/erc20/write/burn.ts | 4 +- .../erc20/write/{claimTo.ts => claim-to.ts} | 4 +- .../{mintBatchTo.ts => mint-batch-to.ts} | 4 +- .../erc20/write/{mintTo.ts => mint-to.ts} | 4 +- .../{setAllowance.ts => set-allowance.ts} | 4 +- ...mConditions.ts => set-claim-conditions.ts} | 6 +- .../{signatureMint.ts => signature-mint.ts} | 4 +- .../{transferFrom.ts => transfer-from.ts} | 4 +- .../extensions/erc20/write/transfer.ts | 4 +- ...nditions.ts => update-claim-conditions.ts} | 6 +- .../contract/extensions/erc721/index.ts | 50 +++++----- .../read/{balanceOf.ts => balance-of.ts} | 2 +- .../erc721/read/{canClaim.ts => can-claim.ts} | 2 +- ...ions.ts => get-active-claim-conditions.ts} | 4 +- ...ditions.ts => get-all-claim-conditions.ts} | 4 +- .../erc721/read/{getAll.ts => get-all.ts} | 2 +- ....ts => get-claim-ineligibility-reasons.ts} | 2 +- ...ClaimerProofs.ts => get-claimer-proofs.ts} | 4 +- .../erc721/read/{getOwned.ts => get-owned.ts} | 2 +- .../contract/extensions/erc721/read/get.ts | 2 +- .../read/{isApproved.ts => is-approved.ts} | 2 +- ...atureGenerate.ts => signature-generate.ts} | 4 +- ...gnaturePrepare.ts => signature-prepare.ts} | 2 +- ...aimedSupply.ts => total-claimed-supply.ts} | 2 +- .../read/{totalCount.ts => total-count.ts} | 2 +- ...medSupply.ts => total-unclaimed-supply.ts} | 2 +- .../contract/extensions/erc721/write/burn.ts | 4 +- .../erc721/write/{claimTo.ts => claim-to.ts} | 4 +- .../write/{lazyMint.ts => lazy-mint.ts} | 4 +- .../{mintBatchTo.ts => mint-batch-to.ts} | 4 +- .../erc721/write/{mintTo.ts => mint-to.ts} | 4 +- ...rovalForAll.ts => set-approval-for-all.ts} | 4 +- ...lForToken.ts => set-approval-for-token.ts} | 4 +- ...mConditions.ts => set-claim-conditions.ts} | 6 +- .../{signatureMint.ts => signature-mint.ts} | 8 +- .../{transferFrom.ts => transfer-from.ts} | 4 +- .../extensions/erc721/write/transfer.ts | 4 +- ...nditions.ts => update-claim-conditions.ts} | 6 +- ...enMetadata.ts => update-token-metadata.ts} | 4 +- .../direct-listings/read/get-all-valid.ts} | 6 +- .../direct-listings/read/get-all.ts} | 6 +- .../direct-listings/read/get-listing.ts} | 6 +- .../direct-listings/read/get-total-count.ts} | 2 +- .../read/is-buyer-approved-for-listing.ts} | 2 +- .../read/is-currency-approved-for-listing.ts} | 2 +- .../approve-buyer-for-reserved-listing.ts} | 4 +- .../write/buy-from-listing.ts} | 4 +- .../direct-listings/write/cancel-listing.ts} | 4 +- .../direct-listings/write/create-listing.ts} | 6 +- ...ke-buyer-approval-for-reserved-listing.ts} | 4 +- .../revoke-currency-approval-for-listing.ts} | 4 +- .../direct-listings/write/update-listing.ts} | 6 +- .../english-auctions/read/get-all-valid.ts} | 6 +- .../english-auctions/read/get-all.ts} | 6 +- .../english-auctions/read/get-auction.ts} | 6 +- .../read/get-bid-buffer-bps.ts} | 2 +- .../read/get-minimum-next-bid.ts} | 2 +- .../english-auctions/read/get-total-count.ts} | 2 +- .../english-auctions/read/get-winner.ts} | 2 +- .../english-auctions/read/get-winning-bid.ts} | 4 +- .../english-auctions/read/is-winning-bid.ts} | 2 +- .../english-auctions/write/buyout-auction.ts} | 2 +- .../english-auctions/write/cancel-auction.ts} | 2 +- .../write/close-auction-for-bidder.ts} | 2 +- .../write/close-auction-for-seller.ts} | 2 +- .../english-auctions/write/create-auction.ts} | 4 +- .../english-auctions/write/execute-sale.ts} | 2 +- .../english-auctions/write/make-bid.ts} | 2 +- .../extensions/marketplace-v3/index.ts | 93 +++++++++++++++++++ .../offers/read/get-all-valid.ts} | 6 +- .../offers/read/get-all.ts} | 6 +- .../offers/read/get-offer.ts} | 6 +- .../offers/read/get-total-count.ts} | 2 +- .../offers/write/accept-offer.ts} | 4 +- .../offers/write/cancel-offer.ts} | 4 +- .../offers/write/make-offer.ts} | 6 +- .../extensions/marketplaceV3/index.ts | 93 ------------------- src/server/routes/contract/metadata/abi.ts | 2 +- src/server/routes/contract/metadata/events.ts | 2 +- .../routes/contract/metadata/extensions.ts | 2 +- .../routes/contract/metadata/functions.ts | 2 +- src/server/routes/contract/read/read.ts | 2 +- .../roles/read/{getAll.ts => get-all.ts} | 2 +- src/server/routes/contract/roles/read/get.ts | 2 +- .../routes/contract/roles/write/grant.ts | 4 +- .../routes/contract/roles/write/revoke.ts | 4 +- ...ltyInfo.ts => get-default-royalty-info.ts} | 2 +- ...yaltyInfo.ts => get-token-royalty-info.ts} | 2 +- ...ltyInfo.ts => set-default-royalty-info.ts} | 4 +- ...yaltyInfo.ts => set-token-royalty-info.ts} | 4 +- ...iption.ts => add-contract-subscription.ts} | 4 +- ...ts => get-contract-indexed-block-range.ts} | 2 +- ...tions.ts => get-contract-subscriptions.ts} | 4 +- ...{getLatestBlock.ts => get-latest-block.ts} | 2 +- ...ion.ts => remove-contract-subscription.ts} | 2 +- ... get-transaction-receipts-by-timestamp.ts} | 4 +- ...eceipts.ts => get-transaction-receipts.ts} | 4 +- ...ts.ts => paginate-transaction-receipts.ts} | 4 +- src/server/routes/contract/write/write.ts | 6 +- .../{contractTypes.ts => contract-types.ts} | 2 +- src/server/routes/deploy/index.ts | 14 +-- src/server/routes/deploy/prebuilt.ts | 4 +- .../{editionDrop.ts => edition-drop.ts} | 4 +- src/server/routes/deploy/prebuilts/edition.ts | 4 +- .../{marketplaceV3.ts => marketplace-v3.ts} | 4 +- .../routes/deploy/prebuilts/multiwrap.ts | 4 +- .../{nftCollection.ts => nft-collection.ts} | 4 +- .../prebuilts/{nftDrop.ts => nft-drop.ts} | 4 +- src/server/routes/deploy/prebuilts/pack.ts | 4 +- .../{signatureDrop.ts => signature-drop.ts} | 4 +- src/server/routes/deploy/prebuilts/split.ts | 4 +- .../prebuilts/{tokenDrop.ts => token-drop.ts} | 4 +- src/server/routes/deploy/prebuilts/token.ts | 4 +- src/server/routes/deploy/prebuilts/vote.ts | 4 +- src/server/routes/deploy/published.ts | 4 +- src/server/routes/index.ts | 86 ++++++++--------- src/server/routes/relayer/create.ts | 2 +- .../routes/relayer/{getAll.ts => get-all.ts} | 2 +- src/server/routes/relayer/index.ts | 2 +- src/server/routes/relayer/revoke.ts | 2 +- src/server/routes/relayer/update.ts | 2 +- src/server/routes/system/queue.ts | 6 +- .../blockchain/{getLogs.ts => get-logs.ts} | 2 +- .../{getReceipt.ts => get-receipt.ts} | 2 +- ...serOpReceipt.ts => get-user-op-receipt.ts} | 2 +- .../{sendSignedTx.ts => send-signed-tx.ts} | 2 +- ...SignedUserOp.ts => send-signed-user-op.ts} | 2 +- src/server/routes/transaction/cancel.ts | 4 +- ...racts.ts => get-all-deployed-contracts.ts} | 2 +- .../transaction/{getAll.ts => get-all.ts} | 2 +- src/server/routes/transaction/retry-failed.ts | 6 +- src/server/routes/transaction/retry.ts | 4 +- src/server/routes/transaction/status.ts | 2 +- src/server/routes/transaction/sync-retry.ts | 4 +- src/server/routes/webhooks/create.ts | 2 +- src/server/routes/webhooks/events.ts | 2 +- .../routes/webhooks/{getAll.ts => get-all.ts} | 2 +- src/server/routes/webhooks/revoke.ts | 2 +- src/server/routes/webhooks/test.ts | 2 +- .../index.ts | 2 +- ...bscription.ts => contract-subscription.ts} | 0 src/server/schemas/contract/index.ts | 2 +- .../schemas/{eventLog.ts => event-log.ts} | 0 .../thirdweb-sdk-version.ts} | 0 .../direct-listing}/index.ts | 2 +- .../english-auction}/index.ts | 2 +- .../offer/index.ts | 2 +- ...redApiSchemas.ts => shared-api-schemas.ts} | 0 ...ctionReceipt.ts => transaction-receipt.ts} | 0 .../{txOverrides.ts => tx-overrides.ts} | 0 .../{marketplaceV3.ts => marketplace-v3.ts} | 0 .../{localStorage.ts => local-storage.ts} | 0 ...nOverrides.ts => transaction-overrides.ts} | 2 +- .../wallets/{awsKmsArn.ts => aws-kms-arn.ts} | 0 ...sKmsWallet.ts => create-aws-kms-wallet.ts} | 4 +- ...pKmsWallet.ts => create-gcp-kms-wallet.ts} | 6 +- ...eLocalWallet.ts => create-local-wallet.ts} | 0 ...eSmartWallet.ts => create-smart-wallet.ts} | 12 +-- ...rams.ts => fetch-aws-kms-wallet-params.ts} | 0 ...rams.ts => fetch-gcp-kms-wallet-params.ts} | 0 ...sourcePath.ts => gcp-kms-resource-path.ts} | 0 ...wsKmsAccount.ts => get-aws-kms-account.ts} | 0 ...cpKmsAccount.ts => get-gcp-kms-account.ts} | 0 ...{getLocalWallet.ts => get-local-wallet.ts} | 2 +- ...{getSmartWallet.ts => get-smart-wallet.ts} | 0 ...sKmsWallet.ts => import-aws-kms-wallet.ts} | 4 +- ...pKmsWallet.ts => import-gcp-kms-wallet.ts} | 2 +- ...tLocalWallet.ts => import-local-wallet.ts} | 2 +- src/shared/db/transactions/queue-tx.ts | 2 +- src/shared/utils/account.ts | 10 +- src/shared/utils/cache/get-wallet.ts | 8 +- .../utils/transaction/insert-transaction.ts | 2 +- .../utils/transaction/queue-transation.ts | 4 +- src/shared/utils/transaction/webhook.ts | 2 +- src/shared/utils/usage.ts | 6 +- src/worker/index.ts | 24 ++--- ...rRegistry.ts => chain-indexer-registry.ts} | 2 +- ...rListener.ts => chain-indexer-listener.ts} | 2 +- .../{configListener.ts => config-listener.ts} | 2 +- ...webhookListener.ts => webhook-listener.ts} | 0 ...eue.ts => cancel-recycled-nonces-queue.ts} | 0 ...tionQueue.ts => mine-transaction-queue.ts} | 0 ...ckQueue.ts => nonce-health-check-queue.ts} | 0 ...ceResyncQueue.ts => nonce-resync-queue.ts} | 0 ...gsQueue.ts => process-event-logs-queue.ts} | 0 ... => process-transaction-receipts-queue.ts} | 0 ...nsQueue.ts => prune-transactions-queue.ts} | 0 ...tionQueue.ts => send-transaction-queue.ts} | 0 ...dWebhookQueue.ts => send-webhook-queue.ts} | 0 ...er.ts => cancel-recycled-nonces-worker.ts} | 2 +- .../{chainIndexer.ts => chain-indexer.ts} | 4 +- ...inIndexers.ts => manage-chain-indexers.ts} | 2 +- ...onWorker.ts => mine-transaction-worker.ts} | 6 +- ...Worker.ts => nonce-health-check-worker.ts} | 2 +- ...ResyncWorker.ts => nonce-resync-worker.ts} | 2 +- ...Worker.ts => process-event-logs-worker.ts} | 4 +- ...=> process-transaction-receipts-worker.ts} | 6 +- ...Worker.ts => prune-transactions-worker.ts} | 2 +- ...onWorker.ts => send-transaction-worker.ts} | 4 +- ...ebhookWorker.ts => send-webhook-worker.ts} | 6 +- tests/unit/aws-arn.test.ts | 2 +- tests/unit/aws-kms.test.ts | 2 +- tests/unit/gcp-kms.test.ts | 2 +- tests/unit/gcp-resource-path.test.ts | 2 +- 330 files changed, 728 insertions(+), 728 deletions(-) rename src/server/listeners/{updateTxListener.ts => update-tx-listener.ts} (100%) rename src/server/middleware/{adminRoutes.ts => admin-routes.ts} (87%) rename src/server/middleware/{engineMode.ts => engine-mode.ts} (100%) rename src/server/middleware/{openApi.ts => open-api.ts} (100%) rename src/server/middleware/{rateLimit.ts => rate-limit.ts} (95%) rename src/server/middleware/{securityHeaders.ts => security-headers.ts} (100%) rename src/server/routes/auth/access-tokens/{getAll.ts => get-all.ts} (94%) rename src/server/routes/auth/permissions/{getAll.ts => get-all.ts} (93%) rename src/server/routes/backend-wallet/{getAll.ts => get-all.ts} (97%) rename src/server/routes/backend-wallet/{getBalance.ts => get-balance.ts} (97%) rename src/server/routes/backend-wallet/{getNonce.ts => get-nonce.ts} (95%) rename src/server/routes/backend-wallet/{getTransactionsByNonce.ts => get-transactions-by-nonce.ts} (97%) rename src/server/routes/backend-wallet/{getTransactions.ts => get-transactions.ts} (97%) rename src/server/routes/backend-wallet/{sendTransactionBatch.ts => send-transaction-batch.ts} (94%) rename src/server/routes/backend-wallet/{sendTransaction.ts => send-transaction.ts} (97%) rename src/server/routes/backend-wallet/{signMessage.ts => sign-message.ts} (97%) rename src/server/routes/backend-wallet/{signTransaction.ts => sign-transaction.ts} (97%) rename src/server/routes/backend-wallet/{signTypedData.ts => sign-typed-data.ts} (95%) rename src/server/routes/backend-wallet/{simulateTransaction.ts => simulate-transaction.ts} (98%) rename src/server/routes/chain/{getAll.ts => get-all.ts} (97%) rename src/server/routes/contract/events/{getAllEvents.ts => get-all-events.ts} (98%) rename src/server/routes/contract/events/{getContractEventLogs.ts => get-contract-event-logs.ts} (99%) rename src/server/routes/contract/events/{getEventLogsByTimestamp.ts => get-event-logs-by-timestamp.ts} (96%) rename src/server/routes/contract/events/{getEvents.ts => get-events.ts} (98%) rename src/server/routes/contract/events/{paginateEventLogs.ts => paginate-event-logs.ts} (97%) rename src/server/routes/contract/extensions/{accountFactory => account-factory}/index.ts (53%) rename src/server/routes/contract/extensions/{accountFactory/read/getAllAccounts.ts => account-factory/read/get-all-accounts.ts} (96%) rename src/server/routes/contract/extensions/{accountFactory/read/getAssociatedAccounts.ts => account-factory/read/get-associated-accounts.ts} (97%) rename src/server/routes/contract/extensions/{accountFactory/read/isAccountDeployed.ts => account-factory/read/is-account-deployed.ts} (97%) rename src/server/routes/contract/extensions/{accountFactory/read/predictAccountAddress.ts => account-factory/read/predict-account-address.ts} (97%) rename src/server/routes/contract/extensions/{accountFactory/write/createAccount.ts => account-factory/write/create-account.ts} (98%) rename src/server/routes/contract/extensions/account/read/{getAllAdmins.ts => get-all-admins.ts} (96%) rename src/server/routes/contract/extensions/account/read/{getAllSessions.ts => get-all-sessions.ts} (97%) rename src/server/routes/contract/extensions/account/write/{grantAdmin.ts => grant-admin.ts} (97%) rename src/server/routes/contract/extensions/account/write/{grantSession.ts => grant-session.ts} (97%) rename src/server/routes/contract/extensions/account/write/{revokeAdmin.ts => revoke-admin.ts} (97%) rename src/server/routes/contract/extensions/account/write/{revokeSession.ts => revoke-session.ts} (97%) rename src/server/routes/contract/extensions/account/write/{updateSession.ts => update-session.ts} (98%) rename src/server/routes/contract/extensions/erc1155/read/{balanceOf.ts => balance-of.ts} (97%) rename src/server/routes/contract/extensions/erc1155/read/{canClaim.ts => can-claim.ts} (97%) rename src/server/routes/contract/extensions/erc1155/read/{getActiveClaimConditions.ts => get-active-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc1155/read/{getAllClaimConditions.ts => get-all-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc1155/read/{getAll.ts => get-all.ts} (98%) rename src/server/routes/contract/extensions/erc1155/read/{getClaimIneligibilityReasons.ts => get-claim-ineligibility-reasons.ts} (98%) rename src/server/routes/contract/extensions/erc1155/read/{getClaimerProofs.ts => get-claimer-proofs.ts} (97%) rename src/server/routes/contract/extensions/erc1155/read/{getOwned.ts => get-owned.ts} (98%) rename src/server/routes/contract/extensions/erc1155/read/{isApproved.ts => is-approved.ts} (97%) rename src/server/routes/contract/extensions/erc1155/read/{signatureGenerate.ts => signature-generate.ts} (98%) rename src/server/routes/contract/extensions/erc1155/read/{totalCount.ts => total-count.ts} (96%) rename src/server/routes/contract/extensions/erc1155/read/{totalSupply.ts => total-supply.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{burnBatch.ts => burn-batch.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{claimTo.ts => claim-to.ts} (98%) rename src/server/routes/contract/extensions/erc1155/write/{lazyMint.ts => lazy-mint.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{mintAdditionalSupplyTo.ts => mint-additional-supply-to.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{mintBatchTo.ts => mint-batch-to.ts} (98%) rename src/server/routes/contract/extensions/erc1155/write/{mintTo.ts => mint-to.ts} (98%) rename src/server/routes/contract/extensions/erc1155/write/{setApprovalForAll.ts => set-approval-for-all.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{setBatchClaimConditions.ts => set-batch-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{setClaimConditions.ts => set-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{signatureMint.ts => signature-mint.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{transferFrom.ts => transfer-from.ts} (98%) rename src/server/routes/contract/extensions/erc1155/write/{updateClaimConditions.ts => update-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc1155/write/{updateTokenMetadata.ts => update-token-metadata.ts} (97%) rename src/server/routes/contract/extensions/erc20/read/{allowanceOf.ts => allowance-of.ts} (98%) rename src/server/routes/contract/extensions/erc20/read/{balanceOf.ts => balance-of.ts} (97%) rename src/server/routes/contract/extensions/erc20/read/{canClaim.ts => can-claim.ts} (97%) rename src/server/routes/contract/extensions/erc20/read/{getActiveClaimConditions.ts => get-active-claim-conditions.ts} (96%) rename src/server/routes/contract/extensions/erc20/read/{getAllClaimConditions.ts => get-all-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc20/read/{getClaimIneligibilityReasons.ts => get-claim-ineligibility-reasons.ts} (97%) rename src/server/routes/contract/extensions/erc20/read/{getClaimerProofs.ts => get-claimer-proofs.ts} (96%) rename src/server/routes/contract/extensions/erc20/read/{signatureGenerate.ts => signature-generate.ts} (98%) rename src/server/routes/contract/extensions/erc20/read/{totalSupply.ts => total-supply.ts} (97%) rename src/server/routes/contract/extensions/erc20/write/{burnFrom.ts => burn-from.ts} (97%) rename src/server/routes/contract/extensions/erc20/write/{claimTo.ts => claim-to.ts} (98%) rename src/server/routes/contract/extensions/erc20/write/{mintBatchTo.ts => mint-batch-to.ts} (97%) rename src/server/routes/contract/extensions/erc20/write/{mintTo.ts => mint-to.ts} (98%) rename src/server/routes/contract/extensions/erc20/write/{setAllowance.ts => set-allowance.ts} (97%) rename src/server/routes/contract/extensions/erc20/write/{setClaimConditions.ts => set-claim-conditions.ts} (96%) rename src/server/routes/contract/extensions/erc20/write/{signatureMint.ts => signature-mint.ts} (97%) rename src/server/routes/contract/extensions/erc20/write/{transferFrom.ts => transfer-from.ts} (98%) rename src/server/routes/contract/extensions/erc20/write/{updateClaimConditions.ts => update-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc721/read/{balanceOf.ts => balance-of.ts} (97%) rename src/server/routes/contract/extensions/erc721/read/{canClaim.ts => can-claim.ts} (97%) rename src/server/routes/contract/extensions/erc721/read/{getActiveClaimConditions.ts => get-active-claim-conditions.ts} (96%) rename src/server/routes/contract/extensions/erc721/read/{getAllClaimConditions.ts => get-all-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc721/read/{getAll.ts => get-all.ts} (97%) rename src/server/routes/contract/extensions/erc721/read/{getClaimIneligibilityReasons.ts => get-claim-ineligibility-reasons.ts} (97%) rename src/server/routes/contract/extensions/erc721/read/{getClaimerProofs.ts => get-claimer-proofs.ts} (96%) rename src/server/routes/contract/extensions/erc721/read/{getOwned.ts => get-owned.ts} (98%) rename src/server/routes/contract/extensions/erc721/read/{isApproved.ts => is-approved.ts} (97%) rename src/server/routes/contract/extensions/erc721/read/{signatureGenerate.ts => signature-generate.ts} (98%) rename src/server/routes/contract/extensions/erc721/read/{signaturePrepare.ts => signature-prepare.ts} (99%) rename src/server/routes/contract/extensions/erc721/read/{totalClaimedSupply.ts => total-claimed-supply.ts} (96%) rename src/server/routes/contract/extensions/erc721/read/{totalCount.ts => total-count.ts} (96%) rename src/server/routes/contract/extensions/erc721/read/{totalUnclaimedSupply.ts => total-unclaimed-supply.ts} (96%) rename src/server/routes/contract/extensions/erc721/write/{claimTo.ts => claim-to.ts} (98%) rename src/server/routes/contract/extensions/erc721/write/{lazyMint.ts => lazy-mint.ts} (97%) rename src/server/routes/contract/extensions/erc721/write/{mintBatchTo.ts => mint-batch-to.ts} (97%) rename src/server/routes/contract/extensions/erc721/write/{mintTo.ts => mint-to.ts} (98%) rename src/server/routes/contract/extensions/erc721/write/{setApprovalForAll.ts => set-approval-for-all.ts} (97%) rename src/server/routes/contract/extensions/erc721/write/{setApprovalForToken.ts => set-approval-for-token.ts} (97%) rename src/server/routes/contract/extensions/erc721/write/{setClaimConditions.ts => set-claim-conditions.ts} (96%) rename src/server/routes/contract/extensions/erc721/write/{signatureMint.ts => signature-mint.ts} (98%) rename src/server/routes/contract/extensions/erc721/write/{transferFrom.ts => transfer-from.ts} (98%) rename src/server/routes/contract/extensions/erc721/write/{updateClaimConditions.ts => update-claim-conditions.ts} (97%) rename src/server/routes/contract/extensions/erc721/write/{updateTokenMetadata.ts => update-token-metadata.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/read/getAllValid.ts => marketplace-v3/direct-listings/read/get-all-valid.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/read/getAll.ts => marketplace-v3/direct-listings/read/get-all.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/read/getListing.ts => marketplace-v3/direct-listings/read/get-listing.ts} (95%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/read/getTotalCount.ts => marketplace-v3/direct-listings/read/get-total-count.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/read/isBuyerApprovedForListing.ts => marketplace-v3/direct-listings/read/is-buyer-approved-for-listing.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts => marketplace-v3/direct-listings/read/is-currency-approved-for-listing.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/write/approveBuyerForReservedListing.ts => marketplace-v3/direct-listings/write/approve-buyer-for-reserved-listing.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/write/buyFromListing.ts => marketplace-v3/direct-listings/write/buy-from-listing.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/write/cancelListing.ts => marketplace-v3/direct-listings/write/cancel-listing.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/write/createListing.ts => marketplace-v3/direct-listings/write/create-listing.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts => marketplace-v3/direct-listings/write/revoke-buyer-approval-for-reserved-listing.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts => marketplace-v3/direct-listings/write/revoke-currency-approval-for-listing.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/directListings/write/updateListing.ts => marketplace-v3/direct-listings/write/update-listing.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/getAllValid.ts => marketplace-v3/english-auctions/read/get-all-valid.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/getAll.ts => marketplace-v3/english-auctions/read/get-all.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/getAuction.ts => marketplace-v3/english-auctions/read/get-auction.ts} (95%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/getBidBufferBps.ts => marketplace-v3/english-auctions/read/get-bid-buffer-bps.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/getMinimumNextBid.ts => marketplace-v3/english-auctions/read/get-minimum-next-bid.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/getTotalCount.ts => marketplace-v3/english-auctions/read/get-total-count.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/getWinner.ts => marketplace-v3/english-auctions/read/get-winner.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/getWinningBid.ts => marketplace-v3/english-auctions/read/get-winning-bid.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/read/isWinningBid.ts => marketplace-v3/english-auctions/read/is-winning-bid.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/write/buyoutAuction.ts => marketplace-v3/english-auctions/write/buyout-auction.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/write/cancelAuction.ts => marketplace-v3/english-auctions/write/cancel-auction.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts => marketplace-v3/english-auctions/write/close-auction-for-bidder.ts} (98%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts => marketplace-v3/english-auctions/write/close-auction-for-seller.ts} (98%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/write/createAuction.ts => marketplace-v3/english-auctions/write/create-auction.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/write/executeSale.ts => marketplace-v3/english-auctions/write/execute-sale.ts} (98%) rename src/server/routes/contract/extensions/{marketplaceV3/englishAuctions/write/makeBid.ts => marketplace-v3/english-auctions/write/make-bid.ts} (98%) create mode 100644 src/server/routes/contract/extensions/marketplace-v3/index.ts rename src/server/routes/contract/extensions/{marketplaceV3/offers/read/getAllValid.ts => marketplace-v3/offers/read/get-all-valid.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/offers/read/getAll.ts => marketplace-v3/offers/read/get-all.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/offers/read/getOffer.ts => marketplace-v3/offers/read/get-offer.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/offers/read/getTotalCount.ts => marketplace-v3/offers/read/get-total-count.ts} (96%) rename src/server/routes/contract/extensions/{marketplaceV3/offers/write/acceptOffer.ts => marketplace-v3/offers/write/accept-offer.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/offers/write/cancelOffer.ts => marketplace-v3/offers/write/cancel-offer.ts} (97%) rename src/server/routes/contract/extensions/{marketplaceV3/offers/write/makeOffer.ts => marketplace-v3/offers/write/make-offer.ts} (97%) delete mode 100644 src/server/routes/contract/extensions/marketplaceV3/index.ts rename src/server/routes/contract/roles/read/{getAll.ts => get-all.ts} (97%) rename src/server/routes/contract/royalties/read/{getDefaultRoyaltyInfo.ts => get-default-royalty-info.ts} (97%) rename src/server/routes/contract/royalties/read/{getTokenRoyaltyInfo.ts => get-token-royalty-info.ts} (97%) rename src/server/routes/contract/royalties/write/{setDefaultRoyaltyInfo.ts => set-default-royalty-info.ts} (97%) rename src/server/routes/contract/royalties/write/{setTokenRoyaltyInfo.ts => set-token-royalty-info.ts} (98%) rename src/server/routes/contract/subscriptions/{addContractSubscription.ts => add-contract-subscription.ts} (97%) rename src/server/routes/contract/subscriptions/{getContractIndexedBlockRange.ts => get-contract-indexed-block-range.ts} (98%) rename src/server/routes/contract/subscriptions/{getContractSubscriptions.ts => get-contract-subscriptions.ts} (91%) rename src/server/routes/contract/subscriptions/{getLatestBlock.ts => get-latest-block.ts} (95%) rename src/server/routes/contract/subscriptions/{removeContractSubscription.ts => remove-contract-subscription.ts} (95%) rename src/server/routes/contract/transactions/{getTransactionReceiptsByTimestamp.ts => get-transaction-receipts-by-timestamp.ts} (97%) rename src/server/routes/contract/transactions/{getTransactionReceipts.ts => get-transaction-receipts.ts} (98%) rename src/server/routes/contract/transactions/{paginateTransactionReceipts.ts => paginate-transaction-receipts.ts} (96%) rename src/server/routes/deploy/{contractTypes.ts => contract-types.ts} (92%) rename src/server/routes/deploy/prebuilts/{editionDrop.ts => edition-drop.ts} (95%) rename src/server/routes/deploy/prebuilts/{marketplaceV3.ts => marketplace-v3.ts} (95%) rename src/server/routes/deploy/prebuilts/{nftCollection.ts => nft-collection.ts} (95%) rename src/server/routes/deploy/prebuilts/{nftDrop.ts => nft-drop.ts} (95%) rename src/server/routes/deploy/prebuilts/{signatureDrop.ts => signature-drop.ts} (95%) rename src/server/routes/deploy/prebuilts/{tokenDrop.ts => token-drop.ts} (95%) rename src/server/routes/relayer/{getAll.ts => get-all.ts} (95%) rename src/server/routes/transaction/blockchain/{getLogs.ts => get-logs.ts} (98%) rename src/server/routes/transaction/blockchain/{getReceipt.ts => get-receipt.ts} (98%) rename src/server/routes/transaction/blockchain/{getUserOpReceipt.ts => get-user-op-receipt.ts} (98%) rename src/server/routes/transaction/blockchain/{sendSignedTx.ts => send-signed-tx.ts} (96%) rename src/server/routes/transaction/blockchain/{sendSignedUserOp.ts => send-signed-user-op.ts} (97%) rename src/server/routes/transaction/{getAllDeployedContracts.ts => get-all-deployed-contracts.ts} (98%) rename src/server/routes/transaction/{getAll.ts => get-all.ts} (98%) rename src/server/routes/webhooks/{getAll.ts => get-all.ts} (93%) rename src/server/schemas/{claimConditions => claim-conditions}/index.ts (98%) rename src/server/schemas/{contractSubscription.ts => contract-subscription.ts} (100%) rename src/server/schemas/{eventLog.ts => event-log.ts} (100%) rename src/server/schemas/{httpHeaders/thirdwebSdkVersion.ts => http-headers/thirdweb-sdk-version.ts} (100%) rename src/server/schemas/{marketplaceV3/directListing => marketplace-v3/direct-listing}/index.ts (97%) rename src/server/schemas/{marketplaceV3/englishAuction => marketplace-v3/english-auction}/index.ts (98%) rename src/server/schemas/{marketplaceV3 => marketplace-v3}/offer/index.ts (97%) rename src/server/schemas/{sharedApiSchemas.ts => shared-api-schemas.ts} (100%) rename src/server/schemas/{transactionReceipt.ts => transaction-receipt.ts} (100%) rename src/server/schemas/{txOverrides.ts => tx-overrides.ts} (100%) rename src/server/utils/{marketplaceV3.ts => marketplace-v3.ts} (100%) rename src/server/utils/storage/{localStorage.ts => local-storage.ts} (100%) rename src/server/utils/{transactionOverrides.ts => transaction-overrides.ts} (96%) rename src/server/utils/wallets/{awsKmsArn.ts => aws-kms-arn.ts} (100%) rename src/server/utils/wallets/{createAwsKmsWallet.ts => create-aws-kms-wallet.ts} (95%) rename src/server/utils/wallets/{createGcpKmsWallet.ts => create-gcp-kms-wallet.ts} (95%) rename src/server/utils/wallets/{createLocalWallet.ts => create-local-wallet.ts} (100%) rename src/server/utils/wallets/{createSmartWallet.ts => create-smart-wallet.ts} (93%) rename src/server/utils/wallets/{fetchAwsKmsWalletParams.ts => fetch-aws-kms-wallet-params.ts} (100%) rename src/server/utils/wallets/{fetchGcpKmsWalletParams.ts => fetch-gcp-kms-wallet-params.ts} (100%) rename src/server/utils/wallets/{gcpKmsResourcePath.ts => gcp-kms-resource-path.ts} (100%) rename src/server/utils/wallets/{getAwsKmsAccount.ts => get-aws-kms-account.ts} (100%) rename src/server/utils/wallets/{getGcpKmsAccount.ts => get-gcp-kms-account.ts} (100%) rename src/server/utils/wallets/{getLocalWallet.ts => get-local-wallet.ts} (97%) rename src/server/utils/wallets/{getSmartWallet.ts => get-smart-wallet.ts} (100%) rename src/server/utils/wallets/{importAwsKmsWallet.ts => import-aws-kms-wallet.ts} (91%) rename src/server/utils/wallets/{importGcpKmsWallet.ts => import-gcp-kms-wallet.ts} (95%) rename src/server/utils/wallets/{importLocalWallet.ts => import-local-wallet.ts} (95%) rename src/worker/indexers/{chainIndexerRegistry.ts => chain-indexer-registry.ts} (96%) rename src/worker/listeners/{chainIndexerListener.ts => chain-indexer-listener.ts} (92%) rename src/worker/listeners/{configListener.ts => config-listener.ts} (97%) rename src/worker/listeners/{webhookListener.ts => webhook-listener.ts} (100%) rename src/worker/queues/{cancelRecycledNoncesQueue.ts => cancel-recycled-nonces-queue.ts} (100%) rename src/worker/queues/{mineTransactionQueue.ts => mine-transaction-queue.ts} (100%) rename src/worker/queues/{nonceHealthCheckQueue.ts => nonce-health-check-queue.ts} (100%) rename src/worker/queues/{nonceResyncQueue.ts => nonce-resync-queue.ts} (100%) rename src/worker/queues/{processEventLogsQueue.ts => process-event-logs-queue.ts} (100%) rename src/worker/queues/{processTransactionReceiptsQueue.ts => process-transaction-receipts-queue.ts} (100%) rename src/worker/queues/{pruneTransactionsQueue.ts => prune-transactions-queue.ts} (100%) rename src/worker/queues/{sendTransactionQueue.ts => send-transaction-queue.ts} (100%) rename src/worker/queues/{sendWebhookQueue.ts => send-webhook-queue.ts} (100%) rename src/worker/tasks/{cancelRecycledNoncesWorker.ts => cancel-recycled-nonces-worker.ts} (97%) rename src/worker/tasks/{chainIndexer.ts => chain-indexer.ts} (97%) rename src/worker/tasks/{manageChainIndexers.ts => manage-chain-indexers.ts} (93%) rename src/worker/tasks/{mineTransactionWorker.ts => mine-transaction-worker.ts} (98%) rename src/worker/tasks/{nonceHealthCheckWorker.ts => nonce-health-check-worker.ts} (98%) rename src/worker/tasks/{nonceResyncWorker.ts => nonce-resync-worker.ts} (97%) rename src/worker/tasks/{processEventLogsWorker.ts => process-event-logs-worker.ts} (98%) rename src/worker/tasks/{processTransactionReceiptsWorker.ts => process-transaction-receipts-worker.ts} (97%) rename src/worker/tasks/{pruneTransactionsWorker.ts => prune-transactions-worker.ts} (93%) rename src/worker/tasks/{sendTransactionWorker.ts => send-transaction-worker.ts} (99%) rename src/worker/tasks/{sendWebhookWorker.ts => send-webhook-worker.ts} (96%) diff --git a/renamer.ts b/renamer.ts index 807ce8355..97c3206e3 100644 --- a/renamer.ts +++ b/renamer.ts @@ -141,5 +141,5 @@ function getAllFiles(rootDir: string, extensions: RegExp): string[] { } // Run the script -const projectRoot = path.resolve("./src/shared/utils"); // Change as needed +const projectRoot = path.resolve("./src/server"); // Change as needed processFilesAndFolders(projectRoot); diff --git a/src/index.ts b/src/index.ts index 9e2ea9b37..81f647e57 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,14 +5,14 @@ import { initServer } from "./server"; import { env } from "./shared/utils/env"; import { logger } from "./shared/utils/logger"; import { initWorker } from "./worker"; -import { CancelRecycledNoncesQueue } from "./worker/queues/cancelRecycledNoncesQueue"; -import { MineTransactionQueue } from "./worker/queues/mineTransactionQueue"; -import { NonceResyncQueue } from "./worker/queues/nonceResyncQueue"; -import { ProcessEventsLogQueue } from "./worker/queues/processEventLogsQueue"; -import { ProcessTransactionReceiptsQueue } from "./worker/queues/processTransactionReceiptsQueue"; -import { PruneTransactionsQueue } from "./worker/queues/pruneTransactionsQueue"; -import { SendTransactionQueue } from "./worker/queues/sendTransactionQueue"; -import { SendWebhookQueue } from "./worker/queues/sendWebhookQueue"; +import { CancelRecycledNoncesQueue } from "./worker/queues/cancel-recycled-nonces-queue"; +import { MineTransactionQueue } from "./worker/queues/mine-transaction-queue"; +import { NonceResyncQueue } from "./worker/queues/nonce-resync-queue"; +import { ProcessEventsLogQueue } from "./worker/queues/process-event-logs-queue"; +import { ProcessTransactionReceiptsQueue } from "./worker/queues/process-transaction-receipts-queue"; +import { PruneTransactionsQueue } from "./worker/queues/prune-transactions-queue"; +import { SendTransactionQueue } from "./worker/queues/send-transaction-queue"; +import { SendWebhookQueue } from "./worker/queues/send-webhook-queue"; const main = async () => { if (env.ENGINE_MODE === "server_only") { diff --git a/src/server/index.ts b/src/server/index.ts index 995e93c38..2628edbae 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -8,17 +8,17 @@ import { env } from "../shared/utils/env"; import { logger } from "../shared/utils/logger"; import { metricsServer } from "../shared/utils/prometheus"; import { withServerUsageReporting } from "../shared/utils/usage"; -import { updateTxListener } from "./listeners/updateTxListener"; -import { withAdminRoutes } from "./middleware/adminRoutes"; +import { updateTxListener } from "./listeners/update-tx-listener"; +import { withAdminRoutes } from "./middleware/admin-routes"; import { withAuth } from "./middleware/auth"; import { withCors } from "./middleware/cors"; -import { withEnforceEngineMode } from "./middleware/engineMode"; +import { withEnforceEngineMode } from "./middleware/engine-mode"; import { withErrorHandler } from "./middleware/error"; import { withRequestLogs } from "./middleware/logs"; -import { withOpenApi } from "./middleware/openApi"; +import { withOpenApi } from "./middleware/open-api"; import { withPrometheus } from "./middleware/prometheus"; -import { withRateLimit } from "./middleware/rateLimit"; -import { withSecurityHeaders } from "./middleware/securityHeaders"; +import { withRateLimit } from "./middleware/rate-limit"; +import { withSecurityHeaders } from "./middleware/security-headers"; import { withWebSocket } from "./middleware/websocket"; import { withRoutes } from "./routes"; import { writeOpenApiToFile } from "./utils/openapi"; diff --git a/src/server/listeners/updateTxListener.ts b/src/server/listeners/update-tx-listener.ts similarity index 100% rename from src/server/listeners/updateTxListener.ts rename to src/server/listeners/update-tx-listener.ts diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/admin-routes.ts similarity index 87% rename from src/server/middleware/adminRoutes.ts rename to src/server/middleware/admin-routes.ts index 6f577d22c..f503a5b9b 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/admin-routes.ts @@ -6,15 +6,15 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { timingSafeEqual } from "node:crypto"; import { env } from "../../shared/utils/env"; -import { CancelRecycledNoncesQueue } from "../../worker/queues/cancelRecycledNoncesQueue"; -import { MineTransactionQueue } from "../../worker/queues/mineTransactionQueue"; -import { NonceHealthCheckQueue } from "../../worker/queues/nonceHealthCheckQueue"; -import { NonceResyncQueue } from "../../worker/queues/nonceResyncQueue"; -import { ProcessEventsLogQueue } from "../../worker/queues/processEventLogsQueue"; -import { ProcessTransactionReceiptsQueue } from "../../worker/queues/processTransactionReceiptsQueue"; -import { PruneTransactionsQueue } from "../../worker/queues/pruneTransactionsQueue"; -import { SendTransactionQueue } from "../../worker/queues/sendTransactionQueue"; -import { SendWebhookQueue } from "../../worker/queues/sendWebhookQueue"; +import { CancelRecycledNoncesQueue } from "../../worker/queues/cancel-recycled-nonces-queue"; +import { MineTransactionQueue } from "../../worker/queues/mine-transaction-queue"; +import { NonceHealthCheckQueue } from "../../worker/queues/nonce-health-check-queue"; +import { NonceResyncQueue } from "../../worker/queues/nonce-resync-queue"; +import { ProcessEventsLogQueue } from "../../worker/queues/process-event-logs-queue"; +import { ProcessTransactionReceiptsQueue } from "../../worker/queues/process-transaction-receipts-queue"; +import { PruneTransactionsQueue } from "../../worker/queues/prune-transactions-queue"; +import { SendTransactionQueue } from "../../worker/queues/send-transaction-queue"; +import { SendWebhookQueue } from "../../worker/queues/send-webhook-queue"; export const ADMIN_QUEUES_BASEPATH = "/admin/queues"; const ADMIN_ROUTES_USERNAME = "admin"; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 41ad84e0d..79690e376 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -24,8 +24,8 @@ import { env } from "../../shared/utils/env"; import { logger } from "../../shared/utils/logger"; import { sendWebhookRequest } from "../../shared/utils/webhook"; import { Permission } from "../../shared/schemas/auth"; -import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; -import { OPENAPI_ROUTES } from "./openApi"; +import { ADMIN_QUEUES_BASEPATH } from "./admin-routes"; +import { OPENAPI_ROUTES } from "./open-api"; export type TAuthData = never; export type TAuthSession = { permissions: string }; diff --git a/src/server/middleware/cors.ts b/src/server/middleware/cors.ts index 62e074ee4..de7e15231 100644 --- a/src/server/middleware/cors.ts +++ b/src/server/middleware/cors.ts @@ -1,6 +1,6 @@ import type { FastifyInstance } from "fastify"; import { getConfig } from "../../shared/utils/cache/get-config"; -import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; +import { ADMIN_QUEUES_BASEPATH } from "./admin-routes"; const STANDARD_METHODS = "GET,POST,DELETE,PUT,PATCH,HEAD,PUT,PATCH,POST,DELETE"; const DEFAULT_ALLOWED_HEADERS = [ diff --git a/src/server/middleware/engineMode.ts b/src/server/middleware/engine-mode.ts similarity index 100% rename from src/server/middleware/engineMode.ts rename to src/server/middleware/engine-mode.ts diff --git a/src/server/middleware/logs.ts b/src/server/middleware/logs.ts index 3ba0cfaf7..b0c494343 100644 --- a/src/server/middleware/logs.ts +++ b/src/server/middleware/logs.ts @@ -1,8 +1,8 @@ import type { FastifyInstance } from "fastify"; import { stringify } from "thirdweb/utils"; import { logger } from "../../shared/utils/logger"; -import { ADMIN_QUEUES_BASEPATH } from "./adminRoutes"; -import { OPENAPI_ROUTES } from "./openApi"; +import { ADMIN_QUEUES_BASEPATH } from "./admin-routes"; +import { OPENAPI_ROUTES } from "./open-api"; const SKIP_LOG_PATHS = new Set([ "", diff --git a/src/server/middleware/openApi.ts b/src/server/middleware/open-api.ts similarity index 100% rename from src/server/middleware/openApi.ts rename to src/server/middleware/open-api.ts diff --git a/src/server/middleware/rateLimit.ts b/src/server/middleware/rate-limit.ts similarity index 95% rename from src/server/middleware/rateLimit.ts rename to src/server/middleware/rate-limit.ts index 96911855a..67cda82c7 100644 --- a/src/server/middleware/rateLimit.ts +++ b/src/server/middleware/rate-limit.ts @@ -3,7 +3,7 @@ import { StatusCodes } from "http-status-codes"; import { env } from "../../shared/utils/env"; import { redis } from "../../shared/utils/redis/redis"; import { createCustomError } from "./error"; -import { OPENAPI_ROUTES } from "./openApi"; +import { OPENAPI_ROUTES } from "./open-api"; const SKIP_RATELIMIT_PATHS = ["/", ...OPENAPI_ROUTES]; diff --git a/src/server/middleware/securityHeaders.ts b/src/server/middleware/security-headers.ts similarity index 100% rename from src/server/middleware/securityHeaders.ts rename to src/server/middleware/security-headers.ts diff --git a/src/server/routes/admin/nonces.ts b/src/server/routes/admin/nonces.ts index 9d73da326..5408dc403 100644 --- a/src/server/routes/admin/nonces.ts +++ b/src/server/routes/admin/nonces.ts @@ -17,7 +17,7 @@ import { getChain } from "../../../shared/utils/chain"; import { redis } from "../../../shared/utils/redis/redis"; import { thirdwebClient } from "../../../shared/utils/sdk"; import { AddressSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/admin/transaction.ts b/src/server/routes/admin/transaction.ts index 4308a5390..ea317ebd6 100644 --- a/src/server/routes/admin/transaction.ts +++ b/src/server/routes/admin/transaction.ts @@ -7,10 +7,10 @@ import { TransactionDB } from "../../../shared/db/transactions/db"; import { getConfig } from "../../../shared/utils/cache/get-config"; import { maybeDate } from "../../../shared/utils/primitive-types"; import { redis } from "../../../shared/utils/redis/redis"; -import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; -import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; +import { MineTransactionQueue } from "../../../worker/queues/mine-transaction-queue"; +import { SendTransactionQueue } from "../../../worker/queues/send-transaction-queue"; import { createCustomError } from "../../middleware/error"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestSchema = Type.Object({ queueId: Type.String({ diff --git a/src/server/routes/auth/access-tokens/create.ts b/src/server/routes/auth/access-tokens/create.ts index c45931417..53502150d 100644 --- a/src/server/routes/auth/access-tokens/create.ts +++ b/src/server/routes/auth/access-tokens/create.ts @@ -8,8 +8,8 @@ import { createToken } from "../../../../shared/db/tokens/create-token"; import { accessTokenCache } from "../../../../shared/utils/cache/access-token"; import { getConfig } from "../../../../shared/utils/cache/get-config"; import { env } from "../../../../shared/utils/env"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { AccessTokenSchema } from "./getAll"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { AccessTokenSchema } from "./get-all"; const requestBodySchema = Type.Object({ label: Type.Optional(Type.String()), diff --git a/src/server/routes/auth/access-tokens/getAll.ts b/src/server/routes/auth/access-tokens/get-all.ts similarity index 94% rename from src/server/routes/auth/access-tokens/getAll.ts rename to src/server/routes/auth/access-tokens/get-all.ts index 739cf96d4..d1a274833 100644 --- a/src/server/routes/auth/access-tokens/getAll.ts +++ b/src/server/routes/auth/access-tokens/get-all.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAccessTokens } from "../../../../shared/db/tokens/get-access-tokens"; import { AddressSchema } from "../../../schemas/address"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; export const AccessTokenSchema = Type.Object({ id: Type.String(), diff --git a/src/server/routes/auth/access-tokens/revoke.ts b/src/server/routes/auth/access-tokens/revoke.ts index 6c41a3c96..5f1bc10da 100644 --- a/src/server/routes/auth/access-tokens/revoke.ts +++ b/src/server/routes/auth/access-tokens/revoke.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { revokeToken } from "../../../../shared/db/tokens/revoke-token"; import { accessTokenCache } from "../../../../shared/utils/cache/access-token"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ id: Type.String(), diff --git a/src/server/routes/auth/access-tokens/update.ts b/src/server/routes/auth/access-tokens/update.ts index 0c0c178ee..9f9fe0cbf 100644 --- a/src/server/routes/auth/access-tokens/update.ts +++ b/src/server/routes/auth/access-tokens/update.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateToken } from "../../../../shared/db/tokens/update-token"; import { accessTokenCache } from "../../../../shared/utils/cache/access-token"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ id: Type.String(), diff --git a/src/server/routes/auth/keypair/add.ts b/src/server/routes/auth/keypair/add.ts index 2aab345ba..b2af520b4 100644 --- a/src/server/routes/auth/keypair/add.ts +++ b/src/server/routes/auth/keypair/add.ts @@ -10,7 +10,7 @@ import { KeypairSchema, toKeypairSchema, } from "../../../../shared/schemas/keypair"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ publicKey: Type.String({ diff --git a/src/server/routes/auth/keypair/list.ts b/src/server/routes/auth/keypair/list.ts index 81fab4e68..b5df85979 100644 --- a/src/server/routes/auth/keypair/list.ts +++ b/src/server/routes/auth/keypair/list.ts @@ -6,7 +6,7 @@ import { KeypairSchema, toKeypairSchema, } from "../../../../shared/schemas/keypair"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const responseBodySchema = Type.Object({ result: Type.Array(KeypairSchema), diff --git a/src/server/routes/auth/keypair/remove.ts b/src/server/routes/auth/keypair/remove.ts index 6cc65f2ff..e7d4f7b54 100644 --- a/src/server/routes/auth/keypair/remove.ts +++ b/src/server/routes/auth/keypair/remove.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { deleteKeypair } from "../../../../shared/db/keypair/delete"; import { keypairCache } from "../../../../shared/utils/cache/keypair"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ hash: Type.String(), diff --git a/src/server/routes/auth/permissions/getAll.ts b/src/server/routes/auth/permissions/get-all.ts similarity index 93% rename from src/server/routes/auth/permissions/getAll.ts rename to src/server/routes/auth/permissions/get-all.ts index 22e4b1478..737c195f6 100644 --- a/src/server/routes/auth/permissions/getAll.ts +++ b/src/server/routes/auth/permissions/get-all.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../../shared/db/client"; import { AddressSchema } from "../../../schemas/address"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const responseBodySchema = Type.Object({ result: Type.Array( diff --git a/src/server/routes/auth/permissions/grant.ts b/src/server/routes/auth/permissions/grant.ts index 4f390e9d1..d524a6b65 100644 --- a/src/server/routes/auth/permissions/grant.ts +++ b/src/server/routes/auth/permissions/grant.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; import { updatePermissions } from "../../../../shared/db/permissions/update-permissions"; import { AddressSchema } from "../../../schemas/address"; import { permissionsSchema } from "../../../../shared/schemas/auth"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ walletAddress: AddressSchema, diff --git a/src/server/routes/auth/permissions/revoke.ts b/src/server/routes/auth/permissions/revoke.ts index 23dd4d8b9..acea77853 100644 --- a/src/server/routes/auth/permissions/revoke.ts +++ b/src/server/routes/auth/permissions/revoke.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { deletePermissions } from "../../../../shared/db/permissions/delete-permissions"; import { AddressSchema } from "../../../schemas/address"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ walletAddress: AddressSchema, diff --git a/src/server/routes/backend-wallet/cancel-nonces.ts b/src/server/routes/backend-wallet/cancel-nonces.ts index 89af789c0..1627aeced 100644 --- a/src/server/routes/backend-wallet/cancel-nonces.ts +++ b/src/server/routes/backend-wallet/cancel-nonces.ts @@ -9,7 +9,7 @@ import { sendCancellationTransaction } from "../../../shared/utils/transaction/c import { requestQuerystringSchema, standardResponseSchema, -} from "../../schemas/sharedApiSchemas"; +} from "../../schemas/shared-api-schemas"; import { walletChainParamSchema, walletHeaderSchema, diff --git a/src/server/routes/backend-wallet/create.ts b/src/server/routes/backend-wallet/create.ts index 2fc800361..707616b47 100644 --- a/src/server/routes/backend-wallet/create.ts +++ b/src/server/routes/backend-wallet/create.ts @@ -10,21 +10,21 @@ import { WalletType } from "../../../shared/schemas/wallet"; import { getConfig } from "../../../shared/utils/cache/get-config"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { CreateAwsKmsWalletError, createAwsKmsWalletDetails, -} from "../../utils/wallets/createAwsKmsWallet"; +} from "../../utils/wallets/create-aws-kms-wallet"; import { CreateGcpKmsWalletError, createGcpKmsWalletDetails, -} from "../../utils/wallets/createGcpKmsWallet"; -import { createLocalWalletDetails } from "../../utils/wallets/createLocalWallet"; +} from "../../utils/wallets/create-gcp-kms-wallet"; +import { createLocalWalletDetails } from "../../utils/wallets/create-local-wallet"; import { createSmartAwsWalletDetails, createSmartGcpWalletDetails, createSmartLocalWalletDetails, -} from "../../utils/wallets/createSmartWallet"; +} from "../../utils/wallets/create-smart-wallet"; const requestBodySchema = Type.Object({ label: Type.Optional(Type.String()), diff --git a/src/server/routes/backend-wallet/getAll.ts b/src/server/routes/backend-wallet/get-all.ts similarity index 97% rename from src/server/routes/backend-wallet/getAll.ts rename to src/server/routes/backend-wallet/get-all.ts index a9ba04a0f..1ae8e26b4 100644 --- a/src/server/routes/backend-wallet/getAll.ts +++ b/src/server/routes/backend-wallet/get-all.ts @@ -5,7 +5,7 @@ import { getAllWallets } from "../../../shared/db/wallets/get-all-wallets"; import { standardResponseSchema, walletDetailsSchema, -} from "../../schemas/sharedApiSchemas"; +} from "../../schemas/shared-api-schemas"; const QuerySchema = Type.Object({ page: Type.Integer({ diff --git a/src/server/routes/backend-wallet/getBalance.ts b/src/server/routes/backend-wallet/get-balance.ts similarity index 97% rename from src/server/routes/backend-wallet/getBalance.ts rename to src/server/routes/backend-wallet/get-balance.ts index 362a98909..609d6a744 100644 --- a/src/server/routes/backend-wallet/getBalance.ts +++ b/src/server/routes/backend-wallet/get-balance.ts @@ -6,7 +6,7 @@ import { AddressSchema } from "../../schemas/address"; import { currencyValueSchema, standardResponseSchema, -} from "../../schemas/sharedApiSchemas"; +} from "../../schemas/shared-api-schemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; diff --git a/src/server/routes/backend-wallet/getNonce.ts b/src/server/routes/backend-wallet/get-nonce.ts similarity index 95% rename from src/server/routes/backend-wallet/getNonce.ts rename to src/server/routes/backend-wallet/get-nonce.ts index aedd1b86c..f6ef216b3 100644 --- a/src/server/routes/backend-wallet/getNonce.ts +++ b/src/server/routes/backend-wallet/get-nonce.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { inspectNonce } from "../../../shared/db/wallets/wallet-nonce"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; 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/get-transactions-by-nonce.ts similarity index 97% rename from src/server/routes/backend-wallet/getTransactionsByNonce.ts rename to src/server/routes/backend-wallet/get-transactions-by-nonce.ts index f60b6b30a..2dd31196b 100644 --- a/src/server/routes/backend-wallet/getTransactionsByNonce.ts +++ b/src/server/routes/backend-wallet/get-transactions-by-nonce.ts @@ -5,7 +5,7 @@ import { TransactionDB } from "../../../shared/db/transactions/db"; import { getNonceMap } from "../../../shared/db/wallets/nonce-map"; import { normalizeAddress } from "../../../shared/utils/primitive-types"; import type { AnyTransaction } from "../../../shared/utils/transaction/types"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { TransactionSchema, toTransactionSchema, diff --git a/src/server/routes/backend-wallet/getTransactions.ts b/src/server/routes/backend-wallet/get-transactions.ts similarity index 97% rename from src/server/routes/backend-wallet/getTransactions.ts rename to src/server/routes/backend-wallet/get-transactions.ts index 24a215697..2ee855562 100644 --- a/src/server/routes/backend-wallet/getTransactions.ts +++ b/src/server/routes/backend-wallet/get-transactions.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; import { getAddress } from "thirdweb"; import { TransactionDB } from "../../../shared/db/transactions/db"; import { PaginationSchema } from "../../schemas/pagination"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { TransactionSchema, toTransactionSchema, diff --git a/src/server/routes/backend-wallet/import.ts b/src/server/routes/backend-wallet/import.ts index 9d86902de..a683bb6c7 100644 --- a/src/server/routes/backend-wallet/import.ts +++ b/src/server/routes/backend-wallet/import.ts @@ -4,11 +4,11 @@ import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../shared/utils/cache/get-config"; import { createCustomError } from "../../middleware/error"; import { AddressSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; -import { getGcpKmsResourcePath } from "../../utils/wallets/gcpKmsResourcePath"; -import { importAwsKmsWallet } from "../../utils/wallets/importAwsKmsWallet"; -import { importGcpKmsWallet } from "../../utils/wallets/importGcpKmsWallet"; -import { importLocalWallet } from "../../utils/wallets/importLocalWallet"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; +import { getGcpKmsResourcePath } from "../../utils/wallets/gcp-kms-resource-path"; +import { importAwsKmsWallet } from "../../utils/wallets/import-aws-kms-wallet"; +import { importGcpKmsWallet } from "../../utils/wallets/import-gcp-kms-wallet"; +import { importLocalWallet } from "../../utils/wallets/import-local-wallet"; const RequestBodySchema = Type.Intersect([ Type.Object({ diff --git a/src/server/routes/backend-wallet/remove.ts b/src/server/routes/backend-wallet/remove.ts index 0cbd94906..ab4cf4752 100644 --- a/src/server/routes/backend-wallet/remove.ts +++ b/src/server/routes/backend-wallet/remove.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; import { deleteWalletDetails } from "../../../shared/db/wallets/delete-wallet-details"; import { AddressSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestParamSchema = Type.Object({ walletAddress: AddressSchema, diff --git a/src/server/routes/backend-wallet/reset-nonces.ts b/src/server/routes/backend-wallet/reset-nonces.ts index 2ecc66249..f94be5b69 100644 --- a/src/server/routes/backend-wallet/reset-nonces.ts +++ b/src/server/routes/backend-wallet/reset-nonces.ts @@ -8,7 +8,7 @@ import { syncLatestNonceFromOnchain, } from "../../../shared/db/wallets/wallet-nonce"; import { AddressSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ chainId: Type.Optional( diff --git a/src/server/routes/backend-wallet/sendTransactionBatch.ts b/src/server/routes/backend-wallet/send-transaction-batch.ts similarity index 94% rename from src/server/routes/backend-wallet/sendTransactionBatch.ts rename to src/server/routes/backend-wallet/send-transaction-batch.ts index 92df6729c..513f4a4ac 100644 --- a/src/server/routes/backend-wallet/sendTransactionBatch.ts +++ b/src/server/routes/backend-wallet/send-transaction-batch.ts @@ -4,14 +4,14 @@ import { StatusCodes } from "http-status-codes"; import type { Address, Hex } from "thirdweb"; import { insertTransaction } from "../../../shared/utils/transaction/insert-transaction"; import { AddressSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../schemas/txOverrides"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../schemas/tx-overrides"; import { walletChainParamSchema, walletHeaderSchema, } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; -import { parseTransactionOverrides } from "../../utils/transactionOverrides"; +import { parseTransactionOverrides } from "../../utils/transaction-overrides"; const requestBodySchema = Type.Array( Type.Object({ diff --git a/src/server/routes/backend-wallet/sendTransaction.ts b/src/server/routes/backend-wallet/send-transaction.ts similarity index 97% rename from src/server/routes/backend-wallet/sendTransaction.ts rename to src/server/routes/backend-wallet/send-transaction.ts index 66d462482..e1dff9a2a 100644 --- a/src/server/routes/backend-wallet/sendTransaction.ts +++ b/src/server/routes/backend-wallet/send-transaction.ts @@ -8,15 +8,15 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../schemas/sharedApiSchemas"; -import { txOverridesSchema } from "../../schemas/txOverrides"; +} from "../../schemas/shared-api-schemas"; +import { txOverridesSchema } from "../../schemas/tx-overrides"; import { maybeAddress, walletChainParamSchema, walletWithAAHeaderSchema, } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; -import { parseTransactionOverrides } from "../../utils/transactionOverrides"; +import { parseTransactionOverrides } from "../../utils/transaction-overrides"; const requestBodySchema = Type.Object({ toAddress: Type.Optional(AddressSchema), diff --git a/src/server/routes/backend-wallet/signMessage.ts b/src/server/routes/backend-wallet/sign-message.ts similarity index 97% rename from src/server/routes/backend-wallet/signMessage.ts rename to src/server/routes/backend-wallet/sign-message.ts index a00e8a860..fa3bb0cfe 100644 --- a/src/server/routes/backend-wallet/signMessage.ts +++ b/src/server/routes/backend-wallet/sign-message.ts @@ -10,7 +10,7 @@ import { import { walletDetailsToAccount } from "../../../shared/utils/account"; import { getChain } from "../../../shared/utils/chain"; import { createCustomError } from "../../middleware/error"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { walletHeaderSchema } from "../../schemas/wallet"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/backend-wallet/signTransaction.ts b/src/server/routes/backend-wallet/sign-transaction.ts similarity index 97% rename from src/server/routes/backend-wallet/signTransaction.ts rename to src/server/routes/backend-wallet/sign-transaction.ts index 74eba697a..fbdf1bec4 100644 --- a/src/server/routes/backend-wallet/signTransaction.ts +++ b/src/server/routes/backend-wallet/sign-transaction.ts @@ -10,7 +10,7 @@ import { } from "../../../shared/utils/primitive-types"; import { toTransactionType } from "../../../shared/utils/sdk"; import { createCustomError } from "../../middleware/error"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { walletHeaderSchema } from "../../schemas/wallet"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/backend-wallet/signTypedData.ts b/src/server/routes/backend-wallet/sign-typed-data.ts similarity index 95% rename from src/server/routes/backend-wallet/signTypedData.ts rename to src/server/routes/backend-wallet/sign-typed-data.ts index e1eee6e3b..d668f60ed 100644 --- a/src/server/routes/backend-wallet/signTypedData.ts +++ b/src/server/routes/backend-wallet/sign-typed-data.ts @@ -3,7 +3,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getWallet } from "../../../shared/utils/cache/get-wallet"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { walletHeaderSchema } from "../../schemas/wallet"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/backend-wallet/simulateTransaction.ts b/src/server/routes/backend-wallet/simulate-transaction.ts similarity index 98% rename from src/server/routes/backend-wallet/simulateTransaction.ts rename to src/server/routes/backend-wallet/simulate-transaction.ts index b8cee7866..cffec3f82 100644 --- a/src/server/routes/backend-wallet/simulateTransaction.ts +++ b/src/server/routes/backend-wallet/simulate-transaction.ts @@ -10,7 +10,7 @@ import { AddressSchema } from "../../schemas/address"; import { simulateResponseSchema, standardResponseSchema, -} from "../../schemas/sharedApiSchemas"; +} from "../../schemas/shared-api-schemas"; import { walletChainParamSchema, walletWithAAHeaderSchema, diff --git a/src/server/routes/backend-wallet/transfer.ts b/src/server/routes/backend-wallet/transfer.ts index 042dde64a..48a1daaeb 100644 --- a/src/server/routes/backend-wallet/transfer.ts +++ b/src/server/routes/backend-wallet/transfer.ts @@ -22,14 +22,14 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../schemas/txOverrides"; +} from "../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../schemas/tx-overrides"; import { walletHeaderSchema, walletWithAddressParamSchema, } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; -import { parseTransactionOverrides } from "../../utils/transactionOverrides"; +import { parseTransactionOverrides } from "../../utils/transaction-overrides"; const requestSchema = Type.Omit(walletWithAddressParamSchema, [ "walletAddress", diff --git a/src/server/routes/backend-wallet/update.ts b/src/server/routes/backend-wallet/update.ts index dca07493f..8a021084b 100644 --- a/src/server/routes/backend-wallet/update.ts +++ b/src/server/routes/backend-wallet/update.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateWalletDetails } from "../../../shared/db/wallets/update-wallet-details"; import { AddressSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ walletAddress: AddressSchema, diff --git a/src/server/routes/backend-wallet/withdraw.ts b/src/server/routes/backend-wallet/withdraw.ts index 50b27a87a..c5e233d23 100644 --- a/src/server/routes/backend-wallet/withdraw.ts +++ b/src/server/routes/backend-wallet/withdraw.ts @@ -21,14 +21,14 @@ import { TokenAmountStringSchema } from "../../schemas/number"; import { requestQuerystringSchema, standardResponseSchema, -} from "../../schemas/sharedApiSchemas"; -import { txOverridesSchema } from "../../schemas/txOverrides"; +} from "../../schemas/shared-api-schemas"; +import { txOverridesSchema } from "../../schemas/tx-overrides"; import { walletHeaderSchema, walletWithAddressParamSchema, } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; -import { parseTransactionOverrides } from "../../utils/transactionOverrides"; +import { parseTransactionOverrides } from "../../utils/transaction-overrides"; const ParamsSchema = Type.Omit(walletWithAddressParamSchema, ["walletAddress"]); diff --git a/src/server/routes/chain/getAll.ts b/src/server/routes/chain/get-all.ts similarity index 97% rename from src/server/routes/chain/getAll.ts rename to src/server/routes/chain/get-all.ts index 2f3efcda5..c508739d7 100644 --- a/src/server/routes/chain/getAll.ts +++ b/src/server/routes/chain/get-all.ts @@ -4,7 +4,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../shared/utils/cache/get-config"; import { chainResponseSchema } from "../../schemas/chain"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; // OUTPUT const responseSchema = Type.Object({ diff --git a/src/server/routes/chain/get.ts b/src/server/routes/chain/get.ts index c271613a3..d77f59710 100644 --- a/src/server/routes/chain/get.ts +++ b/src/server/routes/chain/get.ts @@ -7,7 +7,7 @@ import { chainRequestQuerystringSchema, chainResponseSchema, } from "../../schemas/chain"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../utils/chain"; // OUTPUT diff --git a/src/server/routes/configuration/auth/get.ts b/src/server/routes/configuration/auth/get.ts index e8ff03db6..29c174b4f 100644 --- a/src/server/routes/configuration/auth/get.ts +++ b/src/server/routes/configuration/auth/get.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; export const responseBodySchema = Type.Object({ result: Type.Object({ diff --git a/src/server/routes/configuration/auth/update.ts b/src/server/routes/configuration/auth/update.ts index 518a8d1ac..50d88a49d 100644 --- a/src/server/routes/configuration/auth/update.ts +++ b/src/server/routes/configuration/auth/update.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { responseBodySchema } from "./get"; export const requestBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/backend-wallet-balance/get.ts b/src/server/routes/configuration/backend-wallet-balance/get.ts index 5f0fd671b..c547b40a5 100644 --- a/src/server/routes/configuration/backend-wallet-balance/get.ts +++ b/src/server/routes/configuration/backend-wallet-balance/get.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; export const responseBodySchema = Type.Object({ result: Type.Object({ diff --git a/src/server/routes/configuration/backend-wallet-balance/update.ts b/src/server/routes/configuration/backend-wallet-balance/update.ts index f4a71d569..842fef403 100644 --- a/src/server/routes/configuration/backend-wallet-balance/update.ts +++ b/src/server/routes/configuration/backend-wallet-balance/update.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/get-config"; import { WeiAmountStringSchema } from "../../../schemas/number"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { responseBodySchema } from "./get"; const requestBodySchema = Type.Partial( diff --git a/src/server/routes/configuration/cache/get.ts b/src/server/routes/configuration/cache/get.ts index 069517ad9..986decc8a 100644 --- a/src/server/routes/configuration/cache/get.ts +++ b/src/server/routes/configuration/cache/get.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; export const responseBodySchema = Type.Object({ result: Type.Object({ diff --git a/src/server/routes/configuration/cache/update.ts b/src/server/routes/configuration/cache/update.ts index 7abdeadfd..5ea2c035e 100644 --- a/src/server/routes/configuration/cache/update.ts +++ b/src/server/routes/configuration/cache/update.ts @@ -6,7 +6,7 @@ import { getConfig } from "../../../../shared/utils/cache/get-config"; import { clearCacheCron } from "../../../../shared/utils/cron/clear-cache-cron"; import { isValidCron } from "../../../../shared/utils/cron/is-valid-cron"; import { createCustomError } from "../../../middleware/error"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { responseBodySchema } from "./get"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/chains/get.ts b/src/server/routes/configuration/chains/get.ts index c217b9cbc..1c39b7827 100644 --- a/src/server/routes/configuration/chains/get.ts +++ b/src/server/routes/configuration/chains/get.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../shared/utils/cache/get-config"; import { chainResponseSchema } from "../../../schemas/chain"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; export const responseBodySchema = Type.Object({ result: Type.Array(chainResponseSchema), diff --git a/src/server/routes/configuration/chains/update.ts b/src/server/routes/configuration/chains/update.ts index 9b2c961de..ab053a5b9 100644 --- a/src/server/routes/configuration/chains/update.ts +++ b/src/server/routes/configuration/chains/update.ts @@ -5,7 +5,7 @@ import { updateConfiguration } from "../../../../shared/db/configuration/update- import { getConfig } from "../../../../shared/utils/cache/get-config"; import { sdkCache } from "../../../../shared/utils/cache/get-sdk"; import { chainResponseSchema } from "../../../schemas/chain"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { responseBodySchema } from "./get"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/contract-subscriptions/get.ts b/src/server/routes/configuration/contract-subscriptions/get.ts index 17bb61314..b80669d37 100644 --- a/src/server/routes/configuration/contract-subscriptions/get.ts +++ b/src/server/routes/configuration/contract-subscriptions/get.ts @@ -5,7 +5,7 @@ import { getConfig } from "../../../../shared/utils/cache/get-config"; import { contractSubscriptionConfigurationSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; const responseSchema = Type.Object({ result: contractSubscriptionConfigurationSchema, diff --git a/src/server/routes/configuration/contract-subscriptions/update.ts b/src/server/routes/configuration/contract-subscriptions/update.ts index 1f56319da..ee971de01 100644 --- a/src/server/routes/configuration/contract-subscriptions/update.ts +++ b/src/server/routes/configuration/contract-subscriptions/update.ts @@ -7,7 +7,7 @@ import { createCustomError } from "../../../middleware/error"; import { contractSubscriptionConfigurationSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ maxBlocksToIndex: Type.Optional(Type.Integer({ minimum: 1, maximum: 100 })), diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index 609d3b649..818d81ac3 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cors/get.ts b/src/server/routes/configuration/cors/get.ts index 38ba869bd..fef2c9834 100644 --- a/src/server/routes/configuration/cors/get.ts +++ b/src/server/routes/configuration/cors/get.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/cors/remove.ts b/src/server/routes/configuration/cors/remove.ts index a9ddabb6e..35f3edec4 100644 --- a/src/server/routes/configuration/cors/remove.ts +++ b/src/server/routes/configuration/cors/remove.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/get-config"; import { createCustomError } from "../../../middleware/error"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index a6c7aaf06..529a35111 100644 --- a/src/server/routes/configuration/cors/set.ts +++ b/src/server/routes/configuration/cors/set.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/ip/get.ts b/src/server/routes/configuration/ip/get.ts index 7d7b8d412..de3d71c58 100644 --- a/src/server/routes/configuration/ip/get.ts +++ b/src/server/routes/configuration/ip/get.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; export const responseBodySchema = Type.Object({ result: Type.Array(Type.String()), diff --git a/src/server/routes/configuration/ip/set.ts b/src/server/routes/configuration/ip/set.ts index 001c9debf..f960ba615 100644 --- a/src/server/routes/configuration/ip/set.ts +++ b/src/server/routes/configuration/ip/set.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { responseBodySchema } from "./get"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/configuration/transactions/get.ts b/src/server/routes/configuration/transactions/get.ts index d94ebb09d..9e40d0479 100644 --- a/src/server/routes/configuration/transactions/get.ts +++ b/src/server/routes/configuration/transactions/get.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const responseBodySchema = Type.Object({ result: Type.Object({ diff --git a/src/server/routes/configuration/transactions/update.ts b/src/server/routes/configuration/transactions/update.ts index 0965de34c..801956841 100644 --- a/src/server/routes/configuration/transactions/update.ts +++ b/src/server/routes/configuration/transactions/update.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestBodySchema = Type.Partial( Type.Object({ diff --git a/src/server/routes/configuration/wallets/get.ts b/src/server/routes/configuration/wallets/get.ts index 635ea5223..b3f87ce62 100644 --- a/src/server/routes/configuration/wallets/get.ts +++ b/src/server/routes/configuration/wallets/get.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { WalletType } from "../../../../shared/schemas/wallet"; import { getConfig } from "../../../../shared/utils/cache/get-config"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; export const responseBodySchema = Type.Object({ result: Type.Object({ diff --git a/src/server/routes/configuration/wallets/update.ts b/src/server/routes/configuration/wallets/update.ts index f0e591038..dd4ed2b96 100644 --- a/src/server/routes/configuration/wallets/update.ts +++ b/src/server/routes/configuration/wallets/update.ts @@ -5,7 +5,7 @@ import { updateConfiguration } from "../../../../shared/db/configuration/update- import { WalletType } from "../../../../shared/schemas/wallet"; import { getConfig } from "../../../../shared/utils/cache/get-config"; import { createCustomError } from "../../../middleware/error"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { responseBodySchema } from "./get"; const requestBodySchema = Type.Union([ diff --git a/src/server/routes/contract/events/getAllEvents.ts b/src/server/routes/contract/events/get-all-events.ts similarity index 98% rename from src/server/routes/contract/events/getAllEvents.ts rename to src/server/routes/contract/events/get-all-events.ts index 712d7ca06..240bc0f55 100644 --- a/src/server/routes/contract/events/getAllEvents.ts +++ b/src/server/routes/contract/events/get-all-events.ts @@ -9,7 +9,7 @@ import { import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/events/getContractEventLogs.ts b/src/server/routes/contract/events/get-contract-event-logs.ts similarity index 99% rename from src/server/routes/contract/events/getContractEventLogs.ts rename to src/server/routes/contract/events/get-contract-event-logs.ts index a16266b8d..afba2f28f 100644 --- a/src/server/routes/contract/events/getContractEventLogs.ts +++ b/src/server/routes/contract/events/get-contract-event-logs.ts @@ -8,7 +8,7 @@ import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const requestQuerySchema = Type.Object({ diff --git a/src/server/routes/contract/events/getEventLogsByTimestamp.ts b/src/server/routes/contract/events/get-event-logs-by-timestamp.ts similarity index 96% rename from src/server/routes/contract/events/getEventLogsByTimestamp.ts rename to src/server/routes/contract/events/get-event-logs-by-timestamp.ts index c93ffaa4d..9c8ebb57c 100644 --- a/src/server/routes/contract/events/getEventLogsByTimestamp.ts +++ b/src/server/routes/contract/events/get-event-logs-by-timestamp.ts @@ -3,8 +3,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getEventLogsByBlockTimestamp } from "../../../../shared/db/contract-event-logs/get-contract-event-logs"; import { AddressSchema } from "../../../schemas/address"; -import { eventLogSchema } from "../../../schemas/eventLog"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { eventLogSchema } from "../../../schemas/event-log"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestQuerySchema = Type.Object({ contractAddresses: Type.Optional(Type.Array(AddressSchema)), diff --git a/src/server/routes/contract/events/getEvents.ts b/src/server/routes/contract/events/get-events.ts similarity index 98% rename from src/server/routes/contract/events/getEvents.ts rename to src/server/routes/contract/events/get-events.ts index fa81a5739..f3a2d77b2 100644 --- a/src/server/routes/contract/events/getEvents.ts +++ b/src/server/routes/contract/events/get-events.ts @@ -9,7 +9,7 @@ import { import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/events/paginateEventLogs.ts b/src/server/routes/contract/events/paginate-event-logs.ts similarity index 97% rename from src/server/routes/contract/events/paginateEventLogs.ts rename to src/server/routes/contract/events/paginate-event-logs.ts index 7a4cae470..cc566aee5 100644 --- a/src/server/routes/contract/events/paginateEventLogs.ts +++ b/src/server/routes/contract/events/paginate-event-logs.ts @@ -4,8 +4,8 @@ import { StatusCodes } from "http-status-codes"; import { getConfiguration } from "../../../../shared/db/configuration/get-configuration"; import { getEventLogsByCursor } from "../../../../shared/db/contract-event-logs/get-contract-event-logs"; import { AddressSchema } from "../../../schemas/address"; -import { eventLogSchema, toEventLogSchema } from "../../../schemas/eventLog"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { eventLogSchema, toEventLogSchema } from "../../../schemas/event-log"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const requestQuerySchema = Type.Object({ cursor: Type.Optional(Type.String()), diff --git a/src/server/routes/contract/extensions/accountFactory/index.ts b/src/server/routes/contract/extensions/account-factory/index.ts similarity index 53% rename from src/server/routes/contract/extensions/accountFactory/index.ts rename to src/server/routes/contract/extensions/account-factory/index.ts index 1f10720bf..dae7263fc 100644 --- a/src/server/routes/contract/extensions/accountFactory/index.ts +++ b/src/server/routes/contract/extensions/account-factory/index.ts @@ -1,9 +1,9 @@ import { FastifyInstance } from "fastify"; -import { getAllAccounts } from "./read/getAllAccounts"; -import { getAssociatedAccounts } from "./read/getAssociatedAccounts"; -import { isAccountDeployed } from "./read/isAccountDeployed"; -import { predictAccountAddress } from "./read/predictAccountAddress"; -import { createAccount } from "./write/createAccount"; +import { getAllAccounts } from "./read/get-all-accounts"; +import { getAssociatedAccounts } from "./read/get-associated-accounts"; +import { isAccountDeployed } from "./read/is-account-deployed"; +import { predictAccountAddress } from "./read/predict-account-address"; +import { createAccount } from "./write/create-account"; export const accountFactoryRoutes = async (fastify: FastifyInstance) => { // GET diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts b/src/server/routes/contract/extensions/account-factory/read/get-all-accounts.ts similarity index 96% rename from src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts rename to src/server/routes/contract/extensions/account-factory/read/get-all-accounts.ts index 99109fa48..b445ee240 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts +++ b/src/server/routes/contract/extensions/account-factory/read/get-all-accounts.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts b/src/server/routes/contract/extensions/account-factory/read/get-associated-accounts.ts similarity index 97% rename from src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts rename to src/server/routes/contract/extensions/account-factory/read/get-associated-accounts.ts index e6af059fc..31380e7d9 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts +++ b/src/server/routes/contract/extensions/account-factory/read/get-associated-accounts.ts @@ -6,7 +6,7 @@ import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts b/src/server/routes/contract/extensions/account-factory/read/is-account-deployed.ts similarity index 97% rename from src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts rename to src/server/routes/contract/extensions/account-factory/read/is-account-deployed.ts index 2f497bace..1588f95a6 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts +++ b/src/server/routes/contract/extensions/account-factory/read/is-account-deployed.ts @@ -6,7 +6,7 @@ import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts b/src/server/routes/contract/extensions/account-factory/read/predict-account-address.ts similarity index 97% rename from src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts rename to src/server/routes/contract/extensions/account-factory/read/predict-account-address.ts index fc3453f87..546932cd8 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts +++ b/src/server/routes/contract/extensions/account-factory/read/predict-account-address.ts @@ -7,7 +7,7 @@ import { AddressSchema } from "../../../../../schemas/address"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts b/src/server/routes/contract/extensions/account-factory/write/create-account.ts similarity index 98% rename from src/server/routes/contract/extensions/accountFactory/write/createAccount.ts rename to src/server/routes/contract/extensions/account-factory/write/create-account.ts index 8cb672049..6ae22e694 100644 --- a/src/server/routes/contract/extensions/accountFactory/write/createAccount.ts +++ b/src/server/routes/contract/extensions/account-factory/write/create-account.ts @@ -13,8 +13,8 @@ import { contractParamSchema, requestQuerystringSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { maybeAddress, requiredAddress, diff --git a/src/server/routes/contract/extensions/account/index.ts b/src/server/routes/contract/extensions/account/index.ts index 23ba14c0d..fc5ed960d 100644 --- a/src/server/routes/contract/extensions/account/index.ts +++ b/src/server/routes/contract/extensions/account/index.ts @@ -1,11 +1,11 @@ import { FastifyInstance } from "fastify"; -import { getAllAdmins } from "./read/getAllAdmins"; -import { getAllSessions } from "./read/getAllSessions"; -import { grantAdmin } from "./write/grantAdmin"; -import { grantSession } from "./write/grantSession"; -import { revokeAdmin } from "./write/revokeAdmin"; -import { revokeSession } from "./write/revokeSession"; -import { updateSession } from "./write/updateSession"; +import { getAllAdmins } from "./read/get-all-admins"; +import { getAllSessions } from "./read/get-all-sessions"; +import { grantAdmin } from "./write/grant-admin"; +import { grantSession } from "./write/grant-session"; +import { revokeAdmin } from "./write/revoke-admin"; +import { revokeSession } from "./write/revoke-session"; +import { updateSession } from "./write/update-session"; export const accountRoutes = async (fastify: FastifyInstance) => { // GET diff --git a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts b/src/server/routes/contract/extensions/account/read/get-all-admins.ts similarity index 96% rename from src/server/routes/contract/extensions/account/read/getAllAdmins.ts rename to src/server/routes/contract/extensions/account/read/get-all-admins.ts index af130c242..4bfe3f3b0 100644 --- a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts +++ b/src/server/routes/contract/extensions/account/read/get-all-admins.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/contract/extensions/account/read/getAllSessions.ts b/src/server/routes/contract/extensions/account/read/get-all-sessions.ts similarity index 97% rename from src/server/routes/contract/extensions/account/read/getAllSessions.ts rename to src/server/routes/contract/extensions/account/read/get-all-sessions.ts index 13f1e91ae..4da9384ff 100644 --- a/src/server/routes/contract/extensions/account/read/getAllSessions.ts +++ b/src/server/routes/contract/extensions/account/read/get-all-sessions.ts @@ -6,7 +6,7 @@ import { sessionSchema } from "../../../../../schemas/account"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/contract/extensions/account/write/grantAdmin.ts b/src/server/routes/contract/extensions/account/write/grant-admin.ts similarity index 97% rename from src/server/routes/contract/extensions/account/write/grantAdmin.ts rename to src/server/routes/contract/extensions/account/write/grant-admin.ts index d3ba73f78..38efdb3d7 100644 --- a/src/server/routes/contract/extensions/account/write/grantAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/grant-admin.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/account/write/grantSession.ts b/src/server/routes/contract/extensions/account/write/grant-session.ts similarity index 97% rename from src/server/routes/contract/extensions/account/write/grantSession.ts rename to src/server/routes/contract/extensions/account/write/grant-session.ts index 832146226..90f5a1153 100644 --- a/src/server/routes/contract/extensions/account/write/grantSession.ts +++ b/src/server/routes/contract/extensions/account/write/grant-session.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts b/src/server/routes/contract/extensions/account/write/revoke-admin.ts similarity index 97% rename from src/server/routes/contract/extensions/account/write/revokeAdmin.ts rename to src/server/routes/contract/extensions/account/write/revoke-admin.ts index 7d26c96ed..1fec31058 100644 --- a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/revoke-admin.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/account/write/revokeSession.ts b/src/server/routes/contract/extensions/account/write/revoke-session.ts similarity index 97% rename from src/server/routes/contract/extensions/account/write/revokeSession.ts rename to src/server/routes/contract/extensions/account/write/revoke-session.ts index bb6cf526a..82727db79 100644 --- a/src/server/routes/contract/extensions/account/write/revokeSession.ts +++ b/src/server/routes/contract/extensions/account/write/revoke-session.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/account/write/updateSession.ts b/src/server/routes/contract/extensions/account/write/update-session.ts similarity index 98% rename from src/server/routes/contract/extensions/account/write/updateSession.ts rename to src/server/routes/contract/extensions/account/write/update-session.ts index c7d5aaf38..418c6d6d3 100644 --- a/src/server/routes/contract/extensions/account/write/updateSession.ts +++ b/src/server/routes/contract/extensions/account/write/update-session.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/index.ts b/src/server/routes/contract/extensions/erc1155/index.ts index 04fdab2da..16b23032e 100644 --- a/src/server/routes/contract/extensions/erc1155/index.ts +++ b/src/server/routes/contract/extensions/erc1155/index.ts @@ -1,33 +1,33 @@ import type { FastifyInstance } from "fastify"; -import { erc1155BalanceOf } from "./read/balanceOf"; -import { erc1155CanClaim } from "./read/canClaim"; +import { erc1155BalanceOf } from "./read/balance-of"; +import { erc1155CanClaim } from "./read/can-claim"; import { erc1155Get } from "./read/get"; -import { erc1155GetActiveClaimConditions } from "./read/getActiveClaimConditions"; -import { erc1155GetAll } from "./read/getAll"; -import { erc1155GetAllClaimConditions } from "./read/getAllClaimConditions"; -import { erc1155GetClaimIneligibilityReasons } from "./read/getClaimIneligibilityReasons"; -import { erc1155GetClaimerProofs } from "./read/getClaimerProofs"; -import { erc1155GetOwned } from "./read/getOwned"; -import { erc1155IsApproved } from "./read/isApproved"; -import { erc1155SignatureGenerate } from "./read/signatureGenerate"; -import { erc1155TotalCount } from "./read/totalCount"; -import { erc1155TotalSupply } from "./read/totalSupply"; +import { erc1155GetActiveClaimConditions } from "./read/get-active-claim-conditions"; +import { erc1155GetAll } from "./read/get-all"; +import { erc1155GetAllClaimConditions } from "./read/get-all-claim-conditions"; +import { erc1155GetClaimIneligibilityReasons } from "./read/get-claim-ineligibility-reasons"; +import { erc1155GetClaimerProofs } from "./read/get-claimer-proofs"; +import { erc1155GetOwned } from "./read/get-owned"; +import { erc1155IsApproved } from "./read/is-approved"; +import { erc1155SignatureGenerate } from "./read/signature-generate"; +import { erc1155TotalCount } from "./read/total-count"; +import { erc1155TotalSupply } from "./read/total-supply"; import { erc1155airdrop } from "./write/airdrop"; import { erc1155burn } from "./write/burn"; -import { erc1155burnBatch } from "./write/burnBatch"; -import { erc1155claimTo } from "./write/claimTo"; -import { erc1155lazyMint } from "./write/lazyMint"; -import { erc1155mintAdditionalSupplyTo } from "./write/mintAdditionalSupplyTo"; -import { erc1155mintBatchTo } from "./write/mintBatchTo"; -import { erc1155mintTo } from "./write/mintTo"; -import { erc1155SetApprovalForAll } from "./write/setApprovalForAll"; -import { erc1155SetBatchClaimConditions } from "./write/setBatchClaimConditions"; -import { erc1155SetClaimCondition } from "./write/setClaimConditions"; -import { erc1155SignatureMint } from "./write/signatureMint"; +import { erc1155burnBatch } from "./write/burn-batch"; +import { erc1155claimTo } from "./write/claim-to"; +import { erc1155lazyMint } from "./write/lazy-mint"; +import { erc1155mintAdditionalSupplyTo } from "./write/mint-additional-supply-to"; +import { erc1155mintBatchTo } from "./write/mint-batch-to"; +import { erc1155mintTo } from "./write/mint-to"; +import { erc1155SetApprovalForAll } from "./write/set-approval-for-all"; +import { erc1155SetBatchClaimConditions } from "./write/set-batch-claim-conditions"; +import { erc1155SetClaimCondition } from "./write/set-claim-conditions"; +import { erc1155SignatureMint } from "./write/signature-mint"; import { erc1155transfer } from "./write/transfer"; -import { erc1155transferFrom } from "./write/transferFrom"; -import { erc1155UpdateClaimConditions } from "./write/updateClaimConditions"; -import { erc1155UpdateTokenMetadata } from "./write/updateTokenMetadata"; +import { erc1155transferFrom } from "./write/transfer-from"; +import { erc1155UpdateClaimConditions } from "./write/update-claim-conditions"; +import { erc1155UpdateTokenMetadata } from "./write/update-token-metadata"; export const erc1155Routes = async (fastify: FastifyInstance) => { // GET diff --git a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts b/src/server/routes/contract/extensions/erc1155/read/balance-of.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/read/balanceOf.ts rename to src/server/routes/contract/extensions/erc1155/read/balance-of.ts index 7559cfb2f..82ce95c12 100644 --- a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc1155/read/balance-of.ts @@ -6,7 +6,7 @@ import { AddressSchema } from "../../../../../schemas/address"; import { erc1155ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUTS diff --git a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts b/src/server/routes/contract/extensions/erc1155/read/can-claim.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/read/canClaim.ts rename to src/server/routes/contract/extensions/erc1155/read/can-claim.ts index 54b8ad7a9..459990ad4 100644 --- a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc1155/read/can-claim.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/get-active-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts rename to src/server/routes/contract/extensions/erc1155/read/get-active-claim-conditions.ts index 69fb5b7c7..bb83ab1e6 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get-active-claim-conditions.ts @@ -2,11 +2,11 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; -import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; +import { claimConditionOutputSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/get-all-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts rename to src/server/routes/contract/extensions/erc1155/read/get-all-claim-conditions.ts index 7da7ed4e7..845e6d21c 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get-all-claim-conditions.ts @@ -2,11 +2,11 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; -import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; +import { claimConditionOutputSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/getAll.ts b/src/server/routes/contract/extensions/erc1155/read/get-all.ts similarity index 98% rename from src/server/routes/contract/extensions/erc1155/read/getAll.ts rename to src/server/routes/contract/extensions/erc1155/read/get-all.ts index 18b0ee065..b3deb9017 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get-all.ts @@ -6,7 +6,7 @@ import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc1155/read/get-claim-ineligibility-reasons.ts similarity index 98% rename from src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts rename to src/server/routes/contract/extensions/erc1155/read/get-claim-ineligibility-reasons.ts index 49a90d43e..af758f40a 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get-claim-ineligibility-reasons.ts @@ -8,7 +8,7 @@ import { NumberStringSchema } from "../../../../../schemas/number"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc1155/read/get-claimer-proofs.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts rename to src/server/routes/contract/extensions/erc1155/read/get-claimer-proofs.ts index b8e3e0585..d1cd466ce 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get-claimer-proofs.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; -import { claimerProofSchema } from "../../../../../schemas/claimConditions"; +import { claimerProofSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts b/src/server/routes/contract/extensions/erc1155/read/get-owned.ts similarity index 98% rename from src/server/routes/contract/extensions/erc1155/read/getOwned.ts rename to src/server/routes/contract/extensions/erc1155/read/get-owned.ts index 2015d0fad..ab056da46 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get-owned.ts @@ -7,7 +7,7 @@ import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/get.ts b/src/server/routes/contract/extensions/erc1155/read/get.ts index 95133aae6..2f5b7cb9c 100644 --- a/src/server/routes/contract/extensions/erc1155/read/get.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get.ts @@ -6,7 +6,7 @@ import { nftSchema } from "../../../../../schemas/nft"; import { erc1155ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts b/src/server/routes/contract/extensions/erc1155/read/is-approved.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/read/isApproved.ts rename to src/server/routes/contract/extensions/erc1155/read/is-approved.ts index 1926e67c6..495bd8dc3 100644 --- a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc1155/read/is-approved.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUTS diff --git a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc1155/read/signature-generate.ts similarity index 98% rename from src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts rename to src/server/routes/contract/extensions/erc1155/read/signature-generate.ts index 936dfbc5d..ab2c14ebd 100644 --- a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc1155/read/signature-generate.ts @@ -10,7 +10,7 @@ import { getChain } from "../../../../../../shared/utils/chain"; import { maybeBigInt } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; -import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; +import { thirdwebSdkVersionSchema } from "../../../../../schemas/http-headers/thirdweb-sdk-version"; import { nftInputSchema, signature1155InputSchema, @@ -24,7 +24,7 @@ import { import { erc1155ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { checkAndReturnNFTSignaturePayload } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts b/src/server/routes/contract/extensions/erc1155/read/total-count.ts similarity index 96% rename from src/server/routes/contract/extensions/erc1155/read/totalCount.ts rename to src/server/routes/contract/extensions/erc1155/read/total-count.ts index 363772c4c..8855ea0dd 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc1155/read/total-count.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts b/src/server/routes/contract/extensions/erc1155/read/total-supply.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/read/totalSupply.ts rename to src/server/routes/contract/extensions/erc1155/read/total-supply.ts index 634249cd4..c38c68e0d 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc1155/read/total-supply.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc1155ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts index 4a80f051e..255e7a639 100644 --- a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts +++ b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts b/src/server/routes/contract/extensions/erc1155/write/burn-batch.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/burnBatch.ts rename to src/server/routes/contract/extensions/erc1155/write/burn-batch.ts index a292bd2b4..192a77dc6 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn-batch.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/burn.ts b/src/server/routes/contract/extensions/erc1155/write/burn.ts index a994f1e2e..839b18eb9 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burn.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts b/src/server/routes/contract/extensions/erc1155/write/claim-to.ts similarity index 98% rename from src/server/routes/contract/extensions/erc1155/write/claimTo.ts rename to src/server/routes/contract/extensions/erc1155/write/claim-to.ts index 9de1d79ed..6b38e9e0b 100644 --- a/src/server/routes/contract/extensions/erc1155/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/claim-to.ts @@ -11,8 +11,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { maybeAddress, requiredAddress, diff --git a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts b/src/server/routes/contract/extensions/erc1155/write/lazy-mint.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/lazyMint.ts rename to src/server/routes/contract/extensions/erc1155/write/lazy-mint.ts index 8c5b2bd39..787684276 100644 --- a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/lazy-mint.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts b/src/server/routes/contract/extensions/erc1155/write/mint-additional-supply-to.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts rename to src/server/routes/contract/extensions/erc1155/write/mint-additional-supply-to.ts index 34cf8dc40..33ad86da6 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mint-additional-supply-to.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc1155/write/mint-batch-to.ts similarity index 98% rename from src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts rename to src/server/routes/contract/extensions/erc1155/write/mint-batch-to.ts index e8bf3168e..0fae47ad0 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mint-batch-to.ts @@ -10,8 +10,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts b/src/server/routes/contract/extensions/erc1155/write/mint-to.ts similarity index 98% rename from src/server/routes/contract/extensions/erc1155/write/mintTo.ts rename to src/server/routes/contract/extensions/erc1155/write/mint-to.ts index cacee565b..d1f2c5781 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mint-to.ts @@ -14,8 +14,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { maybeAddress, requiredAddress, diff --git a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc1155/write/set-approval-for-all.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts rename to src/server/routes/contract/extensions/erc1155/write/set-approval-for-all.ts index 2ad9d8f85..091fe875c 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc1155/write/set-approval-for-all.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/set-batch-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts rename to src/server/routes/contract/extensions/erc1155/write/set-batch-claim-conditions.ts index da40cd380..c019767de 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/set-batch-claim-conditions.ts @@ -6,14 +6,14 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type setBatchSantiziedClaimConditionsRequestSchema, -} from "../../../../../schemas/claimConditions"; +} from "../../../../../schemas/claim-conditions"; import { contractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { isUnixEpochTimestamp } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/set-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts rename to src/server/routes/contract/extensions/erc1155/write/set-claim-conditions.ts index 6d3e9693b..047b77757 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/set-claim-conditions.ts @@ -6,14 +6,14 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, -} from "../../../../../schemas/claimConditions"; +} from "../../../../../schemas/claim-conditions"; import { contractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { isUnixEpochTimestamp } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts b/src/server/routes/contract/extensions/erc1155/write/signature-mint.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/signatureMint.ts rename to src/server/routes/contract/extensions/erc1155/write/signature-mint.ts index 395939dc2..946d9050a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/signature-mint.ts @@ -11,8 +11,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts b/src/server/routes/contract/extensions/erc1155/write/transfer-from.ts similarity index 98% rename from src/server/routes/contract/extensions/erc1155/write/transferFrom.ts rename to src/server/routes/contract/extensions/erc1155/write/transfer-from.ts index 207029903..a7930d941 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transfer-from.ts @@ -14,8 +14,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/transfer.ts b/src/server/routes/contract/extensions/erc1155/write/transfer.ts index 947918d67..4b02fff40 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transfer.ts @@ -14,8 +14,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/update-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts rename to src/server/routes/contract/extensions/erc1155/write/update-claim-conditions.ts index 4496ec6cc..0643daca7 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/update-claim-conditions.ts @@ -6,14 +6,14 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, -} from "../../../../../schemas/claimConditions"; +} from "../../../../../schemas/claim-conditions"; import { contractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { isUnixEpochTimestamp } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc1155/write/update-token-metadata.ts similarity index 97% rename from src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts rename to src/server/routes/contract/extensions/erc1155/write/update-token-metadata.ts index 822bd6ad6..724ec1d31 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc1155/write/update-token-metadata.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc20/index.ts b/src/server/routes/contract/extensions/erc20/index.ts index 7fffe048c..c0cc43892 100644 --- a/src/server/routes/contract/extensions/erc20/index.ts +++ b/src/server/routes/contract/extensions/erc20/index.ts @@ -1,25 +1,25 @@ import type { FastifyInstance } from "fastify"; -import { erc20AllowanceOf } from "./read/allowanceOf"; -import { erc20BalanceOf } from "./read/balanceOf"; -import { erc20CanClaim } from "./read/canClaim"; +import { erc20AllowanceOf } from "./read/allowance-of"; +import { erc20BalanceOf } from "./read/balance-of"; +import { erc20CanClaim } from "./read/can-claim"; import { erc20GetMetadata } from "./read/get"; -import { erc20GetActiveClaimConditions } from "./read/getActiveClaimConditions"; -import { erc20GetAllClaimConditions } from "./read/getAllClaimConditions"; -import { erc20GetClaimIneligibilityReasons } from "./read/getClaimIneligibilityReasons"; -import { erc20GetClaimerProofs } from "./read/getClaimerProofs"; -import { erc20SignatureGenerate } from "./read/signatureGenerate"; -import { erc20TotalSupply } from "./read/totalSupply"; +import { erc20GetActiveClaimConditions } from "./read/get-active-claim-conditions"; +import { erc20GetAllClaimConditions } from "./read/get-all-claim-conditions"; +import { erc20GetClaimIneligibilityReasons } from "./read/get-claim-ineligibility-reasons"; +import { erc20GetClaimerProofs } from "./read/get-claimer-proofs"; +import { erc20SignatureGenerate } from "./read/signature-generate"; +import { erc20TotalSupply } from "./read/total-supply"; import { erc20burn } from "./write/burn"; -import { erc20burnFrom } from "./write/burnFrom"; -import { erc20claimTo } from "./write/claimTo"; -import { erc20mintBatchTo } from "./write/mintBatchTo"; -import { erc20mintTo } from "./write/mintTo"; -import { erc20SetAlowance } from "./write/setAllowance"; -import { erc20SetClaimConditions } from "./write/setClaimConditions"; -import { erc20SignatureMint } from "./write/signatureMint"; +import { erc20burnFrom } from "./write/burn-from"; +import { erc20claimTo } from "./write/claim-to"; +import { erc20mintBatchTo } from "./write/mint-batch-to"; +import { erc20mintTo } from "./write/mint-to"; +import { erc20SetAlowance } from "./write/set-allowance"; +import { erc20SetClaimConditions } from "./write/set-claim-conditions"; +import { erc20SignatureMint } from "./write/signature-mint"; import { erc20Transfer } from "./write/transfer"; -import { erc20TransferFrom } from "./write/transferFrom"; -import { erc20UpdateClaimConditions } from "./write/updateClaimConditions"; +import { erc20TransferFrom } from "./write/transfer-from"; +import { erc20UpdateClaimConditions } from "./write/update-claim-conditions"; export const erc20Routes = async (fastify: FastifyInstance) => { // GET diff --git a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts b/src/server/routes/contract/extensions/erc20/read/allowance-of.ts similarity index 98% rename from src/server/routes/contract/extensions/erc20/read/allowanceOf.ts rename to src/server/routes/contract/extensions/erc20/read/allowance-of.ts index bd3d14636..cb8b8a53b 100644 --- a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/allowance-of.ts @@ -6,7 +6,7 @@ import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUTS diff --git a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts b/src/server/routes/contract/extensions/erc20/read/balance-of.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/read/balanceOf.ts rename to src/server/routes/contract/extensions/erc20/read/balance-of.ts index 6f627f965..e0350946d 100644 --- a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/balance-of.ts @@ -7,7 +7,7 @@ import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUTS diff --git a/src/server/routes/contract/extensions/erc20/read/canClaim.ts b/src/server/routes/contract/extensions/erc20/read/can-claim.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/read/canClaim.ts rename to src/server/routes/contract/extensions/erc20/read/can-claim.ts index 962b16e4b..413b24cca 100644 --- a/src/server/routes/contract/extensions/erc20/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc20/read/can-claim.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/get-active-claim-conditions.ts similarity index 96% rename from src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts rename to src/server/routes/contract/extensions/erc20/read/get-active-claim-conditions.ts index b0813f15b..97c1b1ea3 100644 --- a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/get-active-claim-conditions.ts @@ -2,11 +2,11 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; -import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; +import { claimConditionOutputSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/get-all-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts rename to src/server/routes/contract/extensions/erc20/read/get-all-claim-conditions.ts index 8891c2e43..f6bf68f94 100644 --- a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/get-all-claim-conditions.ts @@ -2,11 +2,11 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; -import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; +import { claimConditionOutputSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc20/read/get-claim-ineligibility-reasons.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts rename to src/server/routes/contract/extensions/erc20/read/get-claim-ineligibility-reasons.ts index 4a920f618..40629cbba 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc20/read/get-claim-ineligibility-reasons.ts @@ -6,7 +6,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc20/read/get-claimer-proofs.ts similarity index 96% rename from src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts rename to src/server/routes/contract/extensions/erc20/read/get-claimer-proofs.ts index 69ce75568..d68a11cb4 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc20/read/get-claimer-proofs.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; -import { claimerProofSchema } from "../../../../../schemas/claimConditions"; +import { claimerProofSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc20/read/get.ts b/src/server/routes/contract/extensions/erc20/read/get.ts index ce429d099..d2e783afd 100644 --- a/src/server/routes/contract/extensions/erc20/read/get.ts +++ b/src/server/routes/contract/extensions/erc20/read/get.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { erc20ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc20/read/signature-generate.ts similarity index 98% rename from src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts rename to src/server/routes/contract/extensions/erc20/read/signature-generate.ts index a35a2348d..352e0738a 100644 --- a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc20/read/signature-generate.ts @@ -14,11 +14,11 @@ import { signature20OutputSchema, type erc20ResponseType, } from "../../../../../schemas/erc20"; -import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; +import { thirdwebSdkVersionSchema } from "../../../../../schemas/http-headers/thirdweb-sdk-version"; import { erc20ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { checkAndReturnERC20SignaturePayload } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts b/src/server/routes/contract/extensions/erc20/read/total-supply.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/read/totalSupply.ts rename to src/server/routes/contract/extensions/erc20/read/total-supply.ts index 2146e939b..cefccf0c6 100644 --- a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc20/read/total-supply.ts @@ -6,7 +6,7 @@ import { erc20MetadataSchema } from "../../../../../schemas/erc20"; import { erc20ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts b/src/server/routes/contract/extensions/erc20/write/burn-from.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/write/burnFrom.ts rename to src/server/routes/contract/extensions/erc20/write/burn-from.ts index 5f111985c..d0c9cffcd 100644 --- a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn-from.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc20/write/burn.ts b/src/server/routes/contract/extensions/erc20/write/burn.ts index a0d8758b1..392e5ab89 100644 --- a/src/server/routes/contract/extensions/erc20/write/burn.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc20/write/claimTo.ts b/src/server/routes/contract/extensions/erc20/write/claim-to.ts similarity index 98% rename from src/server/routes/contract/extensions/erc20/write/claimTo.ts rename to src/server/routes/contract/extensions/erc20/write/claim-to.ts index 548bf7c9c..11d5ca69d 100644 --- a/src/server/routes/contract/extensions/erc20/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/claim-to.ts @@ -10,8 +10,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { maybeAddress, requiredAddress, diff --git a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc20/write/mint-batch-to.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts rename to src/server/routes/contract/extensions/erc20/write/mint-batch-to.ts index 5fa723b24..256289397 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mint-batch-to.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc20/write/mintTo.ts b/src/server/routes/contract/extensions/erc20/write/mint-to.ts similarity index 98% rename from src/server/routes/contract/extensions/erc20/write/mintTo.ts rename to src/server/routes/contract/extensions/erc20/write/mint-to.ts index 282f213ca..3d59cf544 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mint-to.ts @@ -12,8 +12,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { maybeAddress, requiredAddress, diff --git a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts b/src/server/routes/contract/extensions/erc20/write/set-allowance.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/write/setAllowance.ts rename to src/server/routes/contract/extensions/erc20/write/set-allowance.ts index a92410c90..33f094bc9 100644 --- a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts +++ b/src/server/routes/contract/extensions/erc20/write/set-allowance.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/set-claim-conditions.ts similarity index 96% rename from src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts rename to src/server/routes/contract/extensions/erc20/write/set-claim-conditions.ts index 625c387ff..0a0fa544c 100644 --- a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/set-claim-conditions.ts @@ -6,14 +6,14 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, -} from "../../../../../schemas/claimConditions"; +} from "../../../../../schemas/claim-conditions"; import { contractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { isUnixEpochTimestamp } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts b/src/server/routes/contract/extensions/erc20/write/signature-mint.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/write/signatureMint.ts rename to src/server/routes/contract/extensions/erc20/write/signature-mint.ts index 07f544103..742ba25f7 100644 --- a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc20/write/signature-mint.ts @@ -11,8 +11,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts b/src/server/routes/contract/extensions/erc20/write/transfer-from.ts similarity index 98% rename from src/server/routes/contract/extensions/erc20/write/transferFrom.ts rename to src/server/routes/contract/extensions/erc20/write/transfer-from.ts index 071edddfc..5751b264a 100644 --- a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/transfer-from.ts @@ -14,8 +14,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc20/write/transfer.ts b/src/server/routes/contract/extensions/erc20/write/transfer.ts index 807f0c43d..2218f1193 100644 --- a/src/server/routes/contract/extensions/erc20/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc20/write/transfer.ts @@ -14,8 +14,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/update-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts rename to src/server/routes/contract/extensions/erc20/write/update-claim-conditions.ts index 9ee27d424..1e78c9387 100644 --- a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/update-claim-conditions.ts @@ -6,14 +6,14 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, -} from "../../../../../schemas/claimConditions"; +} from "../../../../../schemas/claim-conditions"; import { contractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { isUnixEpochTimestamp } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc721/index.ts b/src/server/routes/contract/extensions/erc721/index.ts index 812c045c9..3b8d75107 100644 --- a/src/server/routes/contract/extensions/erc721/index.ts +++ b/src/server/routes/contract/extensions/erc721/index.ts @@ -1,32 +1,32 @@ import type { FastifyInstance } from "fastify"; -import { erc721BalanceOf } from "./read/balanceOf"; -import { erc721CanClaim } from "./read/canClaim"; +import { erc721BalanceOf } from "./read/balance-of"; +import { erc721CanClaim } from "./read/can-claim"; import { erc721Get } from "./read/get"; -import { erc721GetActiveClaimConditions } from "./read/getActiveClaimConditions"; -import { erc721GetAll } from "./read/getAll"; -import { erc721GetAllClaimConditions } from "./read/getAllClaimConditions"; -import { erc721GetClaimIneligibilityReasons } from "./read/getClaimIneligibilityReasons"; -import { erc721GetClaimerProofs } from "./read/getClaimerProofs"; -import { erc721GetOwned } from "./read/getOwned"; -import { erc721IsApproved } from "./read/isApproved"; -import { erc721SignatureGenerate } from "./read/signatureGenerate"; -import { erc721SignaturePrepare } from "./read/signaturePrepare"; -import { erc721TotalClaimedSupply } from "./read/totalClaimedSupply"; -import { erc721TotalCount } from "./read/totalCount"; -import { erc721TotalUnclaimedSupply } from "./read/totalUnclaimedSupply"; +import { erc721GetActiveClaimConditions } from "./read/get-active-claim-conditions"; +import { erc721GetAll } from "./read/get-all"; +import { erc721GetAllClaimConditions } from "./read/get-all-claim-conditions"; +import { erc721GetClaimIneligibilityReasons } from "./read/get-claim-ineligibility-reasons"; +import { erc721GetClaimerProofs } from "./read/get-claimer-proofs"; +import { erc721GetOwned } from "./read/get-owned"; +import { erc721IsApproved } from "./read/is-approved"; +import { erc721SignatureGenerate } from "./read/signature-generate"; +import { erc721SignaturePrepare } from "./read/signature-prepare"; +import { erc721TotalClaimedSupply } from "./read/total-claimed-supply"; +import { erc721TotalCount } from "./read/total-count"; +import { erc721TotalUnclaimedSupply } from "./read/total-unclaimed-supply"; import { erc721burn } from "./write/burn"; -import { erc721claimTo } from "./write/claimTo"; -import { erc721lazyMint } from "./write/lazyMint"; -import { erc721mintBatchTo } from "./write/mintBatchTo"; -import { erc721mintTo } from "./write/mintTo"; -import { erc721SetApprovalForAll } from "./write/setApprovalForAll"; -import { erc721SetApprovalForToken } from "./write/setApprovalForToken"; -import { erc721SetClaimConditions } from "./write/setClaimConditions"; -import { erc721SignatureMint } from "./write/signatureMint"; +import { erc721claimTo } from "./write/claim-to"; +import { erc721lazyMint } from "./write/lazy-mint"; +import { erc721mintBatchTo } from "./write/mint-batch-to"; +import { erc721mintTo } from "./write/mint-to"; +import { erc721SetApprovalForAll } from "./write/set-approval-for-all"; +import { erc721SetApprovalForToken } from "./write/set-approval-for-token"; +import { erc721SetClaimConditions } from "./write/set-claim-conditions"; +import { erc721SignatureMint } from "./write/signature-mint"; import { erc721transfer } from "./write/transfer"; -import { erc721transferFrom } from "./write/transferFrom"; -import { erc721UpdateClaimConditions } from "./write/updateClaimConditions"; -import { erc721UpdateTokenMetadata } from "./write/updateTokenMetadata"; +import { erc721transferFrom } from "./write/transfer-from"; +import { erc721UpdateClaimConditions } from "./write/update-claim-conditions"; +import { erc721UpdateTokenMetadata } from "./write/update-token-metadata"; export const erc721Routes = async (fastify: FastifyInstance) => { // GET diff --git a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts b/src/server/routes/contract/extensions/erc721/read/balance-of.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/read/balanceOf.ts rename to src/server/routes/contract/extensions/erc721/read/balance-of.ts index 690a65d8a..33333c5af 100644 --- a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc721/read/balance-of.ts @@ -6,7 +6,7 @@ import { AddressSchema } from "../../../../../schemas/address"; import { erc721ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUTS diff --git a/src/server/routes/contract/extensions/erc721/read/canClaim.ts b/src/server/routes/contract/extensions/erc721/read/can-claim.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/read/canClaim.ts rename to src/server/routes/contract/extensions/erc721/read/can-claim.ts index 06a4e4b8c..3ea49992c 100644 --- a/src/server/routes/contract/extensions/erc721/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc721/read/can-claim.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/get-active-claim-conditions.ts similarity index 96% rename from src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts rename to src/server/routes/contract/extensions/erc721/read/get-active-claim-conditions.ts index e9f331e1b..91a7879ec 100644 --- a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/get-active-claim-conditions.ts @@ -2,11 +2,11 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; -import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; +import { claimConditionOutputSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/get-all-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts rename to src/server/routes/contract/extensions/erc721/read/get-all-claim-conditions.ts index fd0678711..e0ffab452 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/get-all-claim-conditions.ts @@ -2,11 +2,11 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; -import { claimConditionOutputSchema } from "../../../../../schemas/claimConditions"; +import { claimConditionOutputSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/getAll.ts b/src/server/routes/contract/extensions/erc721/read/get-all.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/read/getAll.ts rename to src/server/routes/contract/extensions/erc721/read/get-all.ts index 20cec27c6..d83515470 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc721/read/get-all.ts @@ -6,7 +6,7 @@ import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc721/read/get-claim-ineligibility-reasons.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts rename to src/server/routes/contract/extensions/erc721/read/get-claim-ineligibility-reasons.ts index f23ea7b9b..8c3d3efb8 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc721/read/get-claim-ineligibility-reasons.ts @@ -6,7 +6,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc721/read/get-claimer-proofs.ts similarity index 96% rename from src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts rename to src/server/routes/contract/extensions/erc721/read/get-claimer-proofs.ts index 7d9f4d8cb..315a79e65 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc721/read/get-claimer-proofs.ts @@ -3,11 +3,11 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { AddressSchema } from "../../../../../schemas/address"; -import { claimerProofSchema } from "../../../../../schemas/claimConditions"; +import { claimerProofSchema } from "../../../../../schemas/claim-conditions"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/getOwned.ts b/src/server/routes/contract/extensions/erc721/read/get-owned.ts similarity index 98% rename from src/server/routes/contract/extensions/erc721/read/getOwned.ts rename to src/server/routes/contract/extensions/erc721/read/get-owned.ts index 16bc18f24..6b577e263 100644 --- a/src/server/routes/contract/extensions/erc721/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc721/read/get-owned.ts @@ -7,7 +7,7 @@ import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/get.ts b/src/server/routes/contract/extensions/erc721/read/get.ts index 993184d7d..1a58d5e7d 100644 --- a/src/server/routes/contract/extensions/erc721/read/get.ts +++ b/src/server/routes/contract/extensions/erc721/read/get.ts @@ -6,7 +6,7 @@ import { nftSchema } from "../../../../../schemas/nft"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/isApproved.ts b/src/server/routes/contract/extensions/erc721/read/is-approved.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/read/isApproved.ts rename to src/server/routes/contract/extensions/erc721/read/is-approved.ts index 6462ccd2f..5afcdfa36 100644 --- a/src/server/routes/contract/extensions/erc721/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc721/read/is-approved.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUTS diff --git a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc721/read/signature-generate.ts similarity index 98% rename from src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts rename to src/server/routes/contract/extensions/erc721/read/signature-generate.ts index 1fc82b9f1..1540bb756 100644 --- a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc721/read/signature-generate.ts @@ -8,7 +8,7 @@ import { getContract as getContractV4 } from "../../../../../../shared/utils/cac import { getChain } from "../../../../../../shared/utils/chain"; import { maybeBigInt } from "../../../../../../shared/utils/primitive-types"; import { thirdwebClient } from "../../../../../../shared/utils/sdk"; -import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; +import { thirdwebSdkVersionSchema } from "../../../../../schemas/http-headers/thirdweb-sdk-version"; import { signature721InputSchema, signature721OutputSchema, @@ -21,7 +21,7 @@ import { import { erc721ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { checkAndReturnNFTSignaturePayload } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts b/src/server/routes/contract/extensions/erc721/read/signature-prepare.ts similarity index 99% rename from src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts rename to src/server/routes/contract/extensions/erc721/read/signature-prepare.ts index 5cb0d632f..6cde4c604 100644 --- a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts +++ b/src/server/routes/contract/extensions/erc721/read/signature-prepare.ts @@ -28,7 +28,7 @@ import { import { erc721ContractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; const requestSchema = erc721ContractParamSchema; diff --git a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/total-claimed-supply.ts similarity index 96% rename from src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts rename to src/server/routes/contract/extensions/erc721/read/total-claimed-supply.ts index 03a62fcd1..720fcc5e3 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/total-claimed-supply.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/totalCount.ts b/src/server/routes/contract/extensions/erc721/read/total-count.ts similarity index 96% rename from src/server/routes/contract/extensions/erc721/read/totalCount.ts rename to src/server/routes/contract/extensions/erc721/read/total-count.ts index 7c5bd1b3b..2c4f0a6a0 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc721/read/total-count.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/total-unclaimed-supply.ts similarity index 96% rename from src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts rename to src/server/routes/contract/extensions/erc721/read/total-unclaimed-supply.ts index 6c914d841..d4fec394c 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/total-unclaimed-supply.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; +} from "../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/erc721/write/burn.ts b/src/server/routes/contract/extensions/erc721/write/burn.ts index 10d9f4a57..4d0ec40f2 100644 --- a/src/server/routes/contract/extensions/erc721/write/burn.ts +++ b/src/server/routes/contract/extensions/erc721/write/burn.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc721/write/claimTo.ts b/src/server/routes/contract/extensions/erc721/write/claim-to.ts similarity index 98% rename from src/server/routes/contract/extensions/erc721/write/claimTo.ts rename to src/server/routes/contract/extensions/erc721/write/claim-to.ts index fdb553dea..58e257191 100644 --- a/src/server/routes/contract/extensions/erc721/write/claimTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/claim-to.ts @@ -11,8 +11,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { maybeAddress, requiredAddress, diff --git a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts b/src/server/routes/contract/extensions/erc721/write/lazy-mint.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/write/lazyMint.ts rename to src/server/routes/contract/extensions/erc721/write/lazy-mint.ts index ac6283318..ad103c268 100644 --- a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/lazy-mint.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc721/write/mint-batch-to.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts rename to src/server/routes/contract/extensions/erc721/write/mint-batch-to.ts index 9f29db2ab..49c1c5bec 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mint-batch-to.ts @@ -10,8 +10,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mint-to.ts similarity index 98% rename from src/server/routes/contract/extensions/erc721/write/mintTo.ts rename to src/server/routes/contract/extensions/erc721/write/mint-to.ts index 5ffb25a49..ac71f4315 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mint-to.ts @@ -14,8 +14,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { maybeAddress, requiredAddress, diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc721/write/set-approval-for-all.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts rename to src/server/routes/contract/extensions/erc721/write/set-approval-for-all.ts index 08fc2cd68..7674f7dc0 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc721/write/set-approval-for-all.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts b/src/server/routes/contract/extensions/erc721/write/set-approval-for-token.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts rename to src/server/routes/contract/extensions/erc721/write/set-approval-for-token.ts index 701d6dcb1..7b12719f2 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts +++ b/src/server/routes/contract/extensions/erc721/write/set-approval-for-token.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/set-claim-conditions.ts similarity index 96% rename from src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts rename to src/server/routes/contract/extensions/erc721/write/set-claim-conditions.ts index cae13f65f..4060fe9e7 100644 --- a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/set-claim-conditions.ts @@ -6,14 +6,14 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, -} from "../../../../../schemas/claimConditions"; +} from "../../../../../schemas/claim-conditions"; import { contractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { isUnixEpochTimestamp } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts b/src/server/routes/contract/extensions/erc721/write/signature-mint.ts similarity index 98% rename from src/server/routes/contract/extensions/erc721/write/signatureMint.ts rename to src/server/routes/contract/extensions/erc721/write/signature-mint.ts index 173b9208b..7dcf26dd3 100644 --- a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/signature-mint.ts @@ -10,7 +10,7 @@ import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { getContractV5 } from "../../../../../../shared/utils/cache/get-contractv5"; import { insertTransaction } from "../../../../../../shared/utils/transaction/insert-transaction"; -import type { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; +import type { thirdwebSdkVersionSchema } from "../../../../../schemas/http-headers/thirdweb-sdk-version"; import { signature721OutputSchema } from "../../../../../schemas/nft"; import { signature721OutputSchemaV5 } from "../../../../../schemas/nft/v5"; import { @@ -18,11 +18,11 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; -import { parseTransactionOverrides } from "../../../../../utils/transactionOverrides"; +import { parseTransactionOverrides } from "../../../../../utils/transaction-overrides"; // INPUTS const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts b/src/server/routes/contract/extensions/erc721/write/transfer-from.ts similarity index 98% rename from src/server/routes/contract/extensions/erc721/write/transferFrom.ts rename to src/server/routes/contract/extensions/erc721/write/transfer-from.ts index 8a6b87038..bf52718be 100644 --- a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc721/write/transfer-from.ts @@ -14,8 +14,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc721/write/transfer.ts b/src/server/routes/contract/extensions/erc721/write/transfer.ts index edbeb4243..4b450ed33 100644 --- a/src/server/routes/contract/extensions/erc721/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc721/write/transfer.ts @@ -14,8 +14,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/update-claim-conditions.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts rename to src/server/routes/contract/extensions/erc721/write/update-claim-conditions.ts index 4e32ebe1b..311d3d839 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/update-claim-conditions.ts @@ -6,14 +6,14 @@ import { getContract } from "../../../../../../shared/utils/cache/get-contract"; import { claimConditionInputSchema, type sanitizedClaimConditionInputSchema, -} from "../../../../../schemas/claimConditions"; +} from "../../../../../schemas/claim-conditions"; import { contractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; import { isUnixEpochTimestamp } from "../../../../../utils/validator"; diff --git a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc721/write/update-token-metadata.ts similarity index 97% rename from src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts rename to src/server/routes/contract/extensions/erc721/write/update-token-metadata.ts index 08a14d3ca..8818f5489 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc721/write/update-token-metadata.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../schemas/txOverrides"; +} from "../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-all-valid.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-all-valid.ts index 3f4a0b73f..a9c0e87f1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-all-valid.ts @@ -2,14 +2,14 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; +import { directListingV3OutputSchema } from "../../../../../../schemas/marketplace-v3/direct-listing"; import { marketplaceFilterSchema, marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatDirectListingV3Result } from "../../../../../../utils/marketplaceV3"; +import { formatDirectListingV3Result } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-all.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-all.ts index c78203a7e..098a1c0b1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-all.ts @@ -2,14 +2,14 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; +import { directListingV3OutputSchema } from "../../../../../../schemas/marketplace-v3/direct-listing"; import { marketplaceFilterSchema, marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatDirectListingV3Result } from "../../../../../../utils/marketplaceV3"; +import { formatDirectListingV3Result } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-listing.ts similarity index 95% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-listing.ts index f7edbf985..dcf842531 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-listing.ts @@ -2,13 +2,13 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { directListingV3OutputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; +import { directListingV3OutputSchema } from "../../../../../../schemas/marketplace-v3/direct-listing"; import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatDirectListingV3Result } from "../../../../../../utils/marketplaceV3"; +import { formatDirectListingV3Result } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-total-count.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-total-count.ts index d621ea00b..3a41ecf0a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/get-total-count.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../../shared/utils/cache/get-contrac import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/is-buyer-approved-for-listing.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/is-buyer-approved-for-listing.ts index 40f28cbc0..5ff4ece65 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/is-buyer-approved-for-listing.ts @@ -6,7 +6,7 @@ import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/is-currency-approved-for-listing.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/is-currency-approved-for-listing.ts index 00434d4b0..b6decb98e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/read/is-currency-approved-for-listing.ts @@ -6,7 +6,7 @@ import { AddressSchema } from "../../../../../../schemas/address"; import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/approve-buyer-for-reserved-listing.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/approve-buyer-for-reserved-listing.ts index 8b4c731bc..516f80d2f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/approve-buyer-for-reserved-listing.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/buy-from-listing.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/buy-from-listing.ts index b7f98a988..2fdbd5fde 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/buy-from-listing.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/cancel-listing.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/cancel-listing.ts index c1f79318a..1a713919c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/cancel-listing.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/create-listing.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/create-listing.ts index 8bd643da5..839614c83 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/create-listing.ts @@ -3,14 +3,14 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; +import { directListingV3InputSchema } from "../../../../../../schemas/marketplace-v3/direct-listing"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/revoke-buyer-approval-for-reserved-listing.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/revoke-buyer-approval-for-reserved-listing.ts index fa41b010a..8441a26f6 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/revoke-buyer-approval-for-reserved-listing.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/revoke-currency-approval-for-listing.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/revoke-currency-approval-for-listing.ts index 864792849..173ae8b38 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/revoke-currency-approval-for-listing.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/update-listing.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts rename to src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/update-listing.ts index f7ac3e544..e58fb3ed6 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/direct-listings/write/update-listing.ts @@ -3,14 +3,14 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; +import { directListingV3InputSchema } from "../../../../../../schemas/marketplace-v3/direct-listing"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-all-valid.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-all-valid.ts index 3ad7cc021..1f52bacc9 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-all-valid.ts @@ -2,14 +2,14 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; +import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplace-v3/english-auction"; import { marketplaceFilterSchema, marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatEnglishAuctionResult } from "../../../../../../utils/marketplaceV3"; +import { formatEnglishAuctionResult } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-all.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-all.ts index ffc390271..489f8fc1c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-all.ts @@ -2,14 +2,14 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; +import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplace-v3/english-auction"; import { marketplaceFilterSchema, marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatEnglishAuctionResult } from "../../../../../../utils/marketplaceV3"; +import { formatEnglishAuctionResult } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-auction.ts similarity index 95% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-auction.ts index 7b905ed9a..fd8bcce4b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-auction.ts @@ -2,13 +2,13 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; +import { englishAuctionOutputSchema } from "../../../../../../schemas/marketplace-v3/english-auction"; import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatEnglishAuctionResult } from "../../../../../../utils/marketplaceV3"; +import { formatEnglishAuctionResult } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-bid-buffer-bps.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-bid-buffer-bps.ts index d757ce2a9..31a67e00f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-bid-buffer-bps.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../../shared/utils/cache/get-contrac import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-minimum-next-bid.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-minimum-next-bid.ts index 8f4d75131..d0e572161 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-minimum-next-bid.ts @@ -6,7 +6,7 @@ import { currencyValueSchema, marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-total-count.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-total-count.ts index 6d9147582..abeadd297 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-total-count.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../../shared/utils/cache/get-contrac import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-winner.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-winner.ts index 8d08adeb2..fbad3aa62 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-winner.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../../shared/utils/cache/get-contrac import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-winning-bid.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-winning-bid.ts index 6aa71c55c..ec8ad5859 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/get-winning-bid.ts @@ -2,11 +2,11 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { bidSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; +import { bidSchema } from "../../../../../../schemas/marketplace-v3/english-auction"; import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/is-winning-bid.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/is-winning-bid.ts index 91d80a481..71ffb1df5 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/read/is-winning-bid.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../../shared/utils/cache/get-contrac import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/buyout-auction.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/buyout-auction.ts index 2cd6ee1f9..f034b5d34 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/buyout-auction.ts @@ -8,7 +8,7 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/cancel-auction.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/cancel-auction.ts index 8f80bd04a..1de125d87 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/cancel-auction.ts @@ -8,7 +8,7 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/close-auction-for-bidder.ts similarity index 98% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/close-auction-for-bidder.ts index c24b9ab3d..6cadc15b4 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/close-auction-for-bidder.ts @@ -8,7 +8,7 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/close-auction-for-seller.ts similarity index 98% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/close-auction-for-seller.ts index a76809151..043e7b95f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/close-auction-for-seller.ts @@ -8,7 +8,7 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/create-auction.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/create-auction.ts index ddf67ed63..d138acd2a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/create-auction.ts @@ -3,13 +3,13 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { englishAuctionInputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; +import { englishAuctionInputSchema } from "../../../../../../schemas/marketplace-v3/english-auction"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/execute-sale.ts similarity index 98% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/execute-sale.ts index 831bae33b..355241e40 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/execute-sale.ts @@ -8,7 +8,7 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/make-bid.ts similarity index 98% rename from src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts rename to src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/make-bid.ts index 0f8d1aaac..a9b254b35 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/english-auctions/write/make-bid.ts @@ -8,7 +8,7 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplace-v3/index.ts b/src/server/routes/contract/extensions/marketplace-v3/index.ts new file mode 100644 index 000000000..cbddf19e3 --- /dev/null +++ b/src/server/routes/contract/extensions/marketplace-v3/index.ts @@ -0,0 +1,93 @@ +import type { FastifyInstance } from "fastify"; +import { directListingsGetAll } from "./direct-listings/read/get-all"; +import { directListingsGetAllValid } from "./direct-listings/read/get-all-valid"; +import { directListingsGetListing } from "./direct-listings/read/get-listing"; +import { directListingsGetTotalCount } from "./direct-listings/read/get-total-count"; +import { directListingsIsBuyerApprovedForListing } from "./direct-listings/read/is-buyer-approved-for-listing"; +import { directListingsIsCurrencyApprovedForListing } from "./direct-listings/read/is-currency-approved-for-listing"; +import { directListingsApproveBuyerForReservedListing } from "./direct-listings/write/approve-buyer-for-reserved-listing"; +import { directListingsBuyFromListing } from "./direct-listings/write/buy-from-listing"; +import { directListingsCancelListing } from "./direct-listings/write/cancel-listing"; +import { directListingsCreateListing } from "./direct-listings/write/create-listing"; +import { directListingsRevokeBuyerApprovalForReservedListing } from "./direct-listings/write/revoke-buyer-approval-for-reserved-listing"; +import { directListingsRevokeCurrencyApprovalForListing } from "./direct-listings/write/revoke-currency-approval-for-listing"; +import { directListingsUpdateListing } from "./direct-listings/write/update-listing"; + +import { englishAuctionsGetAll } from "./english-auctions/read/get-all"; +import { englishAuctionsGetAllValid } from "./english-auctions/read/get-all-valid"; +import { englishAuctionsGetAuction } from "./english-auctions/read/get-auction"; +import { englishAuctionsGetBidBufferBps } from "./english-auctions/read/get-bid-buffer-bps"; +import { englishAuctionsGetMinimumNextBid } from "./english-auctions/read/get-minimum-next-bid"; +import { englishAuctionsGetTotalCount } from "./english-auctions/read/get-total-count"; +import { englishAuctionsGetWinningBid } from "./english-auctions/read/get-winning-bid"; +import { englishAuctionsIsWinningBid } from "./english-auctions/read/is-winning-bid"; +import { englishAuctionsBuyoutAuction } from "./english-auctions/write/buyout-auction"; +import { englishAuctionsCancelAuction } from "./english-auctions/write/cancel-auction"; +import { englishAuctionsCloseAuctionForBidder } from "./english-auctions/write/close-auction-for-bidder"; +import { englishAuctionsCloseAuctionForSeller } from "./english-auctions/write/close-auction-for-seller"; +import { englishAuctionsCreateAuction } from "./english-auctions/write/create-auction"; +import { englishAuctionsExecuteSale } from "./english-auctions/write/execute-sale"; +import { englishAuctionsMakeBid } from "./english-auctions/write/make-bid"; + +import { englishAuctionsGetWinner } from "./english-auctions/read/get-winner"; +import { offersGetAll } from "./offers/read/get-all"; +import { offersGetAllValid } from "./offers/read/get-all-valid"; +import { offersGetOffer } from "./offers/read/get-offer"; +import { offersGetTotalCount } from "./offers/read/get-total-count"; +import { offersAcceptOffer } from "./offers/write/accept-offer"; +import { offersCancelOffer } from "./offers/write/cancel-offer"; +import { offersMakeOffer } from "./offers/write/make-offer"; + +export const marketplaceV3Routes = async (fastify: FastifyInstance) => { + // READ + + // Direct Listings + await fastify.register(directListingsGetAll); + await fastify.register(directListingsGetAllValid); + await fastify.register(directListingsGetListing); + await fastify.register(directListingsIsBuyerApprovedForListing); + await fastify.register(directListingsIsCurrencyApprovedForListing); + await fastify.register(directListingsGetTotalCount); + + // English Auctions + await fastify.register(englishAuctionsGetAll); + await fastify.register(englishAuctionsGetAllValid); + await fastify.register(englishAuctionsGetAuction); + await fastify.register(englishAuctionsGetBidBufferBps); + await fastify.register(englishAuctionsGetMinimumNextBid); + await fastify.register(englishAuctionsGetWinningBid); + await fastify.register(englishAuctionsGetTotalCount); + await fastify.register(englishAuctionsIsWinningBid); + await fastify.register(englishAuctionsGetWinner); + + // Offers + await fastify.register(offersGetAll); + await fastify.register(offersGetAllValid); + await fastify.register(offersGetOffer); + await fastify.register(offersGetTotalCount); + + // WRITE + + // Direct Listings + await fastify.register(directListingsCreateListing); + await fastify.register(directListingsUpdateListing); + await fastify.register(directListingsBuyFromListing); + await fastify.register(directListingsApproveBuyerForReservedListing); + await fastify.register(directListingsRevokeBuyerApprovalForReservedListing); + await fastify.register(directListingsRevokeCurrencyApprovalForListing); + await fastify.register(directListingsCancelListing); + + // English Auctions + await fastify.register(englishAuctionsBuyoutAuction); + await fastify.register(englishAuctionsCancelAuction); + await fastify.register(englishAuctionsCreateAuction); + await fastify.register(englishAuctionsCloseAuctionForBidder); + await fastify.register(englishAuctionsCloseAuctionForSeller); + await fastify.register(englishAuctionsExecuteSale); + await fastify.register(englishAuctionsMakeBid); + + // Offers + await fastify.register(offersMakeOffer); + await fastify.register(offersCancelOffer); + await fastify.register(offersAcceptOffer); +}; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplace-v3/offers/read/get-all-valid.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts rename to src/server/routes/contract/extensions/marketplace-v3/offers/read/get-all-valid.ts index 3f93ef461..ee0eafbe8 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/offers/read/get-all-valid.ts @@ -2,14 +2,14 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; +import { OfferV3OutputSchema } from "../../../../../../schemas/marketplace-v3/offer"; import { marketplaceFilterSchema, marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatOffersV3Result } from "../../../../../../utils/marketplaceV3"; +import { formatOffersV3Result } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts b/src/server/routes/contract/extensions/marketplace-v3/offers/read/get-all.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts rename to src/server/routes/contract/extensions/marketplace-v3/offers/read/get-all.ts index 2e24eb416..c6fc6d0cf 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/offers/read/get-all.ts @@ -2,14 +2,14 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; +import { OfferV3OutputSchema } from "../../../../../../schemas/marketplace-v3/offer"; import { marketplaceFilterSchema, marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatOffersV3Result } from "../../../../../../utils/marketplaceV3"; +import { formatOffersV3Result } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts b/src/server/routes/contract/extensions/marketplace-v3/offers/read/get-offer.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts rename to src/server/routes/contract/extensions/marketplace-v3/offers/read/get-offer.ts index ab67a3570..d1bca7099 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/offers/read/get-offer.ts @@ -2,13 +2,13 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { OfferV3OutputSchema } from "../../../../../../schemas/marketplaceV3/offer"; +import { OfferV3OutputSchema } from "../../../../../../schemas/marketplace-v3/offer"; import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; -import { formatOffersV3Result } from "../../../../../../utils/marketplaceV3"; +import { formatOffersV3Result } from "../../../../../../utils/marketplace-v3"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplace-v3/offers/read/get-total-count.ts similarity index 96% rename from src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts rename to src/server/routes/contract/extensions/marketplace-v3/offers/read/get-total-count.ts index b8dc3259a..6a2758d11 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/offers/read/get-total-count.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../../../shared/utils/cache/get-contrac import { marketplaceV3ContractParamSchema, standardResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; +} from "../../../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts b/src/server/routes/contract/extensions/marketplace-v3/offers/write/accept-offer.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts rename to src/server/routes/contract/extensions/marketplace-v3/offers/write/accept-offer.ts index 8b5931680..7941ce97e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/offers/write/accept-offer.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts b/src/server/routes/contract/extensions/marketplace-v3/offers/write/cancel-offer.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts rename to src/server/routes/contract/extensions/marketplace-v3/offers/write/cancel-offer.ts index a663d0b3b..e8528703f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/offers/write/cancel-offer.ts @@ -8,8 +8,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts b/src/server/routes/contract/extensions/marketplace-v3/offers/write/make-offer.ts similarity index 97% rename from src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts rename to src/server/routes/contract/extensions/marketplace-v3/offers/write/make-offer.ts index 14c022b42..828b4173a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts +++ b/src/server/routes/contract/extensions/marketplace-v3/offers/write/make-offer.ts @@ -3,14 +3,14 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/get-contract"; -import { OfferV3InputSchema } from "../../../../../../schemas/marketplaceV3/offer"; +import { OfferV3InputSchema } from "../../../../../../schemas/marketplace-v3/offer"; import { marketplaceV3ContractParamSchema, requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +} from "../../../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/index.ts b/src/server/routes/contract/extensions/marketplaceV3/index.ts deleted file mode 100644 index aa637a707..000000000 --- a/src/server/routes/contract/extensions/marketplaceV3/index.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { FastifyInstance } from "fastify"; -import { directListingsGetAll } from "./directListings/read/getAll"; -import { directListingsGetAllValid } from "./directListings/read/getAllValid"; -import { directListingsGetListing } from "./directListings/read/getListing"; -import { directListingsGetTotalCount } from "./directListings/read/getTotalCount"; -import { directListingsIsBuyerApprovedForListing } from "./directListings/read/isBuyerApprovedForListing"; -import { directListingsIsCurrencyApprovedForListing } from "./directListings/read/isCurrencyApprovedForListing"; -import { directListingsApproveBuyerForReservedListing } from "./directListings/write/approveBuyerForReservedListing"; -import { directListingsBuyFromListing } from "./directListings/write/buyFromListing"; -import { directListingsCancelListing } from "./directListings/write/cancelListing"; -import { directListingsCreateListing } from "./directListings/write/createListing"; -import { directListingsRevokeBuyerApprovalForReservedListing } from "./directListings/write/revokeBuyerApprovalForReservedListing"; -import { directListingsRevokeCurrencyApprovalForListing } from "./directListings/write/revokeCurrencyApprovalForListing"; -import { directListingsUpdateListing } from "./directListings/write/updateListing"; - -import { englishAuctionsGetAll } from "./englishAuctions/read/getAll"; -import { englishAuctionsGetAllValid } from "./englishAuctions/read/getAllValid"; -import { englishAuctionsGetAuction } from "./englishAuctions/read/getAuction"; -import { englishAuctionsGetBidBufferBps } from "./englishAuctions/read/getBidBufferBps"; -import { englishAuctionsGetMinimumNextBid } from "./englishAuctions/read/getMinimumNextBid"; -import { englishAuctionsGetTotalCount } from "./englishAuctions/read/getTotalCount"; -import { englishAuctionsGetWinningBid } from "./englishAuctions/read/getWinningBid"; -import { englishAuctionsIsWinningBid } from "./englishAuctions/read/isWinningBid"; -import { englishAuctionsBuyoutAuction } from "./englishAuctions/write/buyoutAuction"; -import { englishAuctionsCancelAuction } from "./englishAuctions/write/cancelAuction"; -import { englishAuctionsCloseAuctionForBidder } from "./englishAuctions/write/closeAuctionForBidder"; -import { englishAuctionsCloseAuctionForSeller } from "./englishAuctions/write/closeAuctionForSeller"; -import { englishAuctionsCreateAuction } from "./englishAuctions/write/createAuction"; -import { englishAuctionsExecuteSale } from "./englishAuctions/write/executeSale"; -import { englishAuctionsMakeBid } from "./englishAuctions/write/makeBid"; - -import { englishAuctionsGetWinner } from "./englishAuctions/read/getWinner"; -import { offersGetAll } from "./offers/read/getAll"; -import { offersGetAllValid } from "./offers/read/getAllValid"; -import { offersGetOffer } from "./offers/read/getOffer"; -import { offersGetTotalCount } from "./offers/read/getTotalCount"; -import { offersAcceptOffer } from "./offers/write/acceptOffer"; -import { offersCancelOffer } from "./offers/write/cancelOffer"; -import { offersMakeOffer } from "./offers/write/makeOffer"; - -export const marketplaceV3Routes = async (fastify: FastifyInstance) => { - // READ - - // Direct Listings - await fastify.register(directListingsGetAll); - await fastify.register(directListingsGetAllValid); - await fastify.register(directListingsGetListing); - await fastify.register(directListingsIsBuyerApprovedForListing); - await fastify.register(directListingsIsCurrencyApprovedForListing); - await fastify.register(directListingsGetTotalCount); - - // English Auctions - await fastify.register(englishAuctionsGetAll); - await fastify.register(englishAuctionsGetAllValid); - await fastify.register(englishAuctionsGetAuction); - await fastify.register(englishAuctionsGetBidBufferBps); - await fastify.register(englishAuctionsGetMinimumNextBid); - await fastify.register(englishAuctionsGetWinningBid); - await fastify.register(englishAuctionsGetTotalCount); - await fastify.register(englishAuctionsIsWinningBid); - await fastify.register(englishAuctionsGetWinner); - - // Offers - await fastify.register(offersGetAll); - await fastify.register(offersGetAllValid); - await fastify.register(offersGetOffer); - await fastify.register(offersGetTotalCount); - - // WRITE - - // Direct Listings - await fastify.register(directListingsCreateListing); - await fastify.register(directListingsUpdateListing); - await fastify.register(directListingsBuyFromListing); - await fastify.register(directListingsApproveBuyerForReservedListing); - await fastify.register(directListingsRevokeBuyerApprovalForReservedListing); - await fastify.register(directListingsRevokeCurrencyApprovalForListing); - await fastify.register(directListingsCancelListing); - - // English Auctions - await fastify.register(englishAuctionsBuyoutAuction); - await fastify.register(englishAuctionsCancelAuction); - await fastify.register(englishAuctionsCreateAuction); - await fastify.register(englishAuctionsCloseAuctionForBidder); - await fastify.register(englishAuctionsCloseAuctionForSeller); - await fastify.register(englishAuctionsExecuteSale); - await fastify.register(englishAuctionsMakeBid); - - // Offers - await fastify.register(offersMakeOffer); - await fastify.register(offersCancelOffer); - await fastify.register(offersAcceptOffer); -}; diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index ae16a2d0e..1a89be573 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -6,7 +6,7 @@ import { abiSchema } from "../../../schemas/contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/metadata/events.ts b/src/server/routes/contract/metadata/events.ts index aa5f5db05..65183b070 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -6,7 +6,7 @@ import { abiEventSchema } from "../../../schemas/contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/metadata/extensions.ts b/src/server/routes/contract/metadata/extensions.ts index 54fcfe539..91937dd74 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -6,7 +6,7 @@ import { getContract } from "../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/metadata/functions.ts b/src/server/routes/contract/metadata/functions.ts index 2c037b2b7..59dd6356a 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -6,7 +6,7 @@ import { abiFunctionSchema } from "../../../schemas/contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/read/read.ts b/src/server/routes/contract/read/read.ts index d2a58e2ad..c84610df8 100644 --- a/src/server/routes/contract/read/read.ts +++ b/src/server/routes/contract/read/read.ts @@ -11,7 +11,7 @@ import { import { partialRouteSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; import { bigNumberReplacer } from "../../../utils/convertor"; diff --git a/src/server/routes/contract/roles/read/getAll.ts b/src/server/routes/contract/roles/read/get-all.ts similarity index 97% rename from src/server/routes/contract/roles/read/getAll.ts rename to src/server/routes/contract/roles/read/get-all.ts index 54b688b86..feb579acb 100644 --- a/src/server/routes/contract/roles/read/getAll.ts +++ b/src/server/routes/contract/roles/read/get-all.ts @@ -6,7 +6,7 @@ import { rolesResponseSchema } from "../../../../schemas/contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../schemas/sharedApiSchemas"; +} from "../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/roles/read/get.ts b/src/server/routes/contract/roles/read/get.ts index 7e0edcb5f..398686032 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -5,7 +5,7 @@ import { getContract } from "../../../../../shared/utils/cache/get-contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../schemas/sharedApiSchemas"; +} from "../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/roles/write/grant.ts b/src/server/routes/contract/roles/write/grant.ts index d453d6f83..9735ffc8b 100644 --- a/src/server/routes/contract/roles/write/grant.ts +++ b/src/server/routes/contract/roles/write/grant.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../schemas/txOverrides"; +} from "../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../utils/chain"; diff --git a/src/server/routes/contract/roles/write/revoke.ts b/src/server/routes/contract/roles/write/revoke.ts index 908a1b7d5..b9dd3fa47 100644 --- a/src/server/routes/contract/roles/write/revoke.ts +++ b/src/server/routes/contract/roles/write/revoke.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../schemas/txOverrides"; +} from "../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../utils/chain"; diff --git a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/get-default-royalty-info.ts similarity index 97% rename from src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts rename to src/server/routes/contract/royalties/read/get-default-royalty-info.ts index 1aac3f328..1bdcd69d8 100644 --- a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/get-default-royalty-info.ts @@ -6,7 +6,7 @@ import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../schemas/sharedApiSchemas"; +} from "../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../utils/chain"; const requestSchema = contractParamSchema; diff --git a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/get-token-royalty-info.ts similarity index 97% rename from src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts rename to src/server/routes/contract/royalties/read/get-token-royalty-info.ts index 4497ed123..33f23cae0 100644 --- a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/get-token-royalty-info.ts @@ -6,7 +6,7 @@ import { royaltySchema } from "../../../../schemas/contract"; import { contractParamSchema, standardResponseSchema, -} from "../../../../schemas/sharedApiSchemas"; +} from "../../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../../utils/chain"; const requestSchema = Type.Object({ diff --git a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/set-default-royalty-info.ts similarity index 97% rename from src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts rename to src/server/routes/contract/royalties/write/set-default-royalty-info.ts index 37b670021..44d80ca7c 100644 --- a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/set-default-royalty-info.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../schemas/txOverrides"; +} from "../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../utils/chain"; diff --git a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/set-token-royalty-info.ts similarity index 98% rename from src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts rename to src/server/routes/contract/royalties/write/set-token-royalty-info.ts index c7f3c7d6b..df1d2b0a3 100644 --- a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/set-token-royalty-info.ts @@ -9,8 +9,8 @@ import { requestQuerystringSchema, standardResponseSchema, transactionWritesResponseSchema, -} from "../../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../../schemas/txOverrides"; +} from "../../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../utils/chain"; diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/add-contract-subscription.ts similarity index 97% rename from src/server/routes/contract/subscriptions/addContractSubscription.ts rename to src/server/routes/contract/subscriptions/add-contract-subscription.ts index 7807b1731..c890b2479 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/add-contract-subscription.ts @@ -17,8 +17,8 @@ import { chainIdOrSlugSchema } from "../../../schemas/chain"; import { contractSubscriptionSchema, toContractSubscriptionSchema, -} from "../../../schemas/contractSubscription"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/contract-subscription"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; import { isValidWebhookUrl } from "../../../utils/validator"; diff --git a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts b/src/server/routes/contract/subscriptions/get-contract-indexed-block-range.ts similarity index 98% rename from src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts rename to src/server/routes/contract/subscriptions/get-contract-indexed-block-range.ts index 1d72bd12b..770b89a5e 100644 --- a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts +++ b/src/server/routes/contract/subscriptions/get-contract-indexed-block-range.ts @@ -8,7 +8,7 @@ import { chainIdOrSlugSchema } from "../../../schemas/chain"; import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const responseSchema = Type.Object({ diff --git a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts b/src/server/routes/contract/subscriptions/get-contract-subscriptions.ts similarity index 91% rename from src/server/routes/contract/subscriptions/getContractSubscriptions.ts rename to src/server/routes/contract/subscriptions/get-contract-subscriptions.ts index e825b437d..562097770 100644 --- a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts +++ b/src/server/routes/contract/subscriptions/get-contract-subscriptions.ts @@ -5,8 +5,8 @@ import { getAllContractSubscriptions } from "../../../../shared/db/contract-subs import { contractSubscriptionSchema, toContractSubscriptionSchema, -} from "../../../schemas/contractSubscription"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +} from "../../../schemas/contract-subscription"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const responseSchema = Type.Object({ result: Type.Array(contractSubscriptionSchema), diff --git a/src/server/routes/contract/subscriptions/getLatestBlock.ts b/src/server/routes/contract/subscriptions/get-latest-block.ts similarity index 95% rename from src/server/routes/contract/subscriptions/getLatestBlock.ts rename to src/server/routes/contract/subscriptions/get-latest-block.ts index 38f308b2b..3bfb99024 100644 --- a/src/server/routes/contract/subscriptions/getLatestBlock.ts +++ b/src/server/routes/contract/subscriptions/get-latest-block.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getLastIndexedBlock } from "../../../../shared/db/chain-indexers/get-chain-indexer"; import { chainRequestQuerystringSchema } from "../../../schemas/chain"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; const responseSchema = Type.Object({ diff --git a/src/server/routes/contract/subscriptions/removeContractSubscription.ts b/src/server/routes/contract/subscriptions/remove-contract-subscription.ts similarity index 95% rename from src/server/routes/contract/subscriptions/removeContractSubscription.ts rename to src/server/routes/contract/subscriptions/remove-contract-subscription.ts index e7ebfcb4a..ef1c4d06c 100644 --- a/src/server/routes/contract/subscriptions/removeContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/remove-contract-subscription.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { deleteContractSubscription } from "../../../../shared/db/contract-subscriptions/delete-contract-subscription"; import { deleteWebhook } from "../../../../shared/db/webhooks/revoke-webhook"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; const bodySchema = Type.Object({ contractSubscriptionId: Type.String({ diff --git a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts b/src/server/routes/contract/transactions/get-transaction-receipts-by-timestamp.ts similarity index 97% rename from src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts rename to src/server/routes/contract/transactions/get-transaction-receipts-by-timestamp.ts index 6db81d04e..2b6136353 100644 --- a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts +++ b/src/server/routes/contract/transactions/get-transaction-receipts-by-timestamp.ts @@ -3,8 +3,8 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getTransactionReceiptsByBlockTimestamp } from "../../../../shared/db/contract-transaction-receipts/get-contract-transaction-receipts"; import { AddressSchema } from "../../../schemas/address"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { transactionReceiptSchema } from "../../../schemas/transactionReceipt"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { transactionReceiptSchema } from "../../../schemas/transaction-receipt"; const requestQuerySchema = Type.Object({ contractAddresses: Type.Optional(Type.Array(AddressSchema)), diff --git a/src/server/routes/contract/transactions/getTransactionReceipts.ts b/src/server/routes/contract/transactions/get-transaction-receipts.ts similarity index 98% rename from src/server/routes/contract/transactions/getTransactionReceipts.ts rename to src/server/routes/contract/transactions/get-transaction-receipts.ts index 8822c46f0..4dcc02616 100644 --- a/src/server/routes/contract/transactions/getTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/get-transaction-receipts.ts @@ -7,8 +7,8 @@ import { createCustomError } from "../../../middleware/error"; import { contractParamSchema, standardResponseSchema, -} from "../../../schemas/sharedApiSchemas"; -import { transactionReceiptSchema } from "../../../schemas/transactionReceipt"; +} from "../../../schemas/shared-api-schemas"; +import { transactionReceiptSchema } from "../../../schemas/transaction-receipt"; import { getChainIdFromChain } from "../../../utils/chain"; const requestQuerySchema = Type.Object({ diff --git a/src/server/routes/contract/transactions/paginateTransactionReceipts.ts b/src/server/routes/contract/transactions/paginate-transaction-receipts.ts similarity index 96% rename from src/server/routes/contract/transactions/paginateTransactionReceipts.ts rename to src/server/routes/contract/transactions/paginate-transaction-receipts.ts index b9db6ec49..162ef3260 100644 --- a/src/server/routes/contract/transactions/paginateTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/paginate-transaction-receipts.ts @@ -4,11 +4,11 @@ import { StatusCodes } from "http-status-codes"; import { getConfiguration } from "../../../../shared/db/configuration/get-configuration"; import { getTransactionReceiptsByCursor } from "../../../../shared/db/contract-transaction-receipts/get-contract-transaction-receipts"; import { AddressSchema } from "../../../schemas/address"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { toTransactionReceiptSchema, transactionReceiptSchema, -} from "../../../schemas/transactionReceipt"; +} from "../../../schemas/transaction-receipt"; /* Consider moving all cursor logic inside db file */ diff --git a/src/server/routes/contract/write/write.ts b/src/server/routes/contract/write/write.ts index c3ea10a25..fd5d6e99e 100644 --- a/src/server/routes/contract/write/write.ts +++ b/src/server/routes/contract/write/write.ts @@ -12,8 +12,8 @@ import { contractParamSchema, requestQuerystringSchema, transactionWritesResponseSchema, -} from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +} from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { maybeAddress, requiredAddress, @@ -21,7 +21,7 @@ import { } from "../../../schemas/wallet"; import { sanitizeAbi, sanitizeFunctionName } from "../../../utils/abi"; import { getChainIdFromChain } from "../../../utils/chain"; -import { parseTransactionOverrides } from "../../../utils/transactionOverrides"; +import { parseTransactionOverrides } from "../../../utils/transaction-overrides"; // INPUT const writeRequestBodySchema = Type.Object({ diff --git a/src/server/routes/deploy/contractTypes.ts b/src/server/routes/deploy/contract-types.ts similarity index 92% rename from src/server/routes/deploy/contractTypes.ts rename to src/server/routes/deploy/contract-types.ts index 9340bbb23..7944aa585 100644 --- a/src/server/routes/deploy/contractTypes.ts +++ b/src/server/routes/deploy/contract-types.ts @@ -2,7 +2,7 @@ import { Static, Type } from "@sinclair/typebox"; import { PREBUILT_CONTRACTS_MAP } from "@thirdweb-dev/sdk"; import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; // OUTPUT export const responseBodySchema = Type.Object({ diff --git a/src/server/routes/deploy/index.ts b/src/server/routes/deploy/index.ts index 15301f23b..7815ec974 100644 --- a/src/server/routes/deploy/index.ts +++ b/src/server/routes/deploy/index.ts @@ -1,19 +1,19 @@ import { FastifyInstance } from "fastify"; import { deployPrebuiltEdition } from "./prebuilts/edition"; -import { deployPrebuiltEditionDrop } from "./prebuilts/editionDrop"; -import { deployPrebuiltMarketplaceV3 } from "./prebuilts/marketplaceV3"; +import { deployPrebuiltEditionDrop } from "./prebuilts/edition-drop"; +import { deployPrebuiltMarketplaceV3 } from "./prebuilts/marketplace-v3"; import { deployPrebuiltMultiwrap } from "./prebuilts/multiwrap"; -import { deployPrebuiltNFTCollection } from "./prebuilts/nftCollection"; -import { deployPrebuiltNFTDrop } from "./prebuilts/nftDrop"; +import { deployPrebuiltNFTCollection } from "./prebuilts/nft-collection"; +import { deployPrebuiltNFTDrop } from "./prebuilts/nft-drop"; import { deployPrebuiltPack } from "./prebuilts/pack"; -import { deployPrebuiltSignatureDrop } from "./prebuilts/signatureDrop"; +import { deployPrebuiltSignatureDrop } from "./prebuilts/signature-drop"; import { deployPrebuiltSplit } from "./prebuilts/split"; import { deployPrebuiltToken } from "./prebuilts/token"; -import { deployPrebuiltTokenDrop } from "./prebuilts/tokenDrop"; +import { deployPrebuiltTokenDrop } from "./prebuilts/token-drop"; import { deployPrebuiltVote } from "./prebuilts/vote"; import { deployPrebuilt } from "./prebuilt"; import { deployPublished } from "./published"; -import { contractTypes } from "./contractTypes"; +import { contractTypes } from "./contract-types"; export const prebuiltsRoutes = async (fastify: FastifyInstance) => { await fastify.register(deployPrebuiltEdition); diff --git a/src/server/routes/deploy/prebuilt.ts b/src/server/routes/deploy/prebuilt.ts index abb97673e..00b159b47 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.ts @@ -9,8 +9,8 @@ import { contractDeployBasicSchema } from "../../schemas/contract"; import { prebuiltDeployParamSchema, standardResponseSchema, -} from "../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../schemas/txOverrides"; +} from "../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/editionDrop.ts b/src/server/routes/deploy/prebuilts/edition-drop.ts similarity index 95% rename from src/server/routes/deploy/prebuilts/editionDrop.ts rename to src/server/routes/deploy/prebuilts/edition-drop.ts index 0e264fa14..cd20d61e7 100644 --- a/src/server/routes/deploy/prebuilts/editionDrop.ts +++ b/src/server/routes/deploy/prebuilts/edition-drop.ts @@ -16,8 +16,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/edition.ts b/src/server/routes/deploy/prebuilts/edition.ts index d4da4fe9f..c81807151 100644 --- a/src/server/routes/deploy/prebuilts/edition.ts +++ b/src/server/routes/deploy/prebuilts/edition.ts @@ -15,8 +15,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts/index"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/marketplaceV3.ts b/src/server/routes/deploy/prebuilts/marketplace-v3.ts similarity index 95% rename from src/server/routes/deploy/prebuilts/marketplaceV3.ts rename to src/server/routes/deploy/prebuilts/marketplace-v3.ts index a087d7ca0..c01e93121 100644 --- a/src/server/routes/deploy/prebuilts/marketplaceV3.ts +++ b/src/server/routes/deploy/prebuilts/marketplace-v3.ts @@ -12,8 +12,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/multiwrap.ts b/src/server/routes/deploy/prebuilts/multiwrap.ts index 48c2e0406..42f295d90 100644 --- a/src/server/routes/deploy/prebuilts/multiwrap.ts +++ b/src/server/routes/deploy/prebuilts/multiwrap.ts @@ -13,8 +13,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/nftCollection.ts b/src/server/routes/deploy/prebuilts/nft-collection.ts similarity index 95% rename from src/server/routes/deploy/prebuilts/nftCollection.ts rename to src/server/routes/deploy/prebuilts/nft-collection.ts index 4856e9c79..43d5c330a 100644 --- a/src/server/routes/deploy/prebuilts/nftCollection.ts +++ b/src/server/routes/deploy/prebuilts/nft-collection.ts @@ -15,8 +15,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/nftDrop.ts b/src/server/routes/deploy/prebuilts/nft-drop.ts similarity index 95% rename from src/server/routes/deploy/prebuilts/nftDrop.ts rename to src/server/routes/deploy/prebuilts/nft-drop.ts index 71b3b0ebf..2c33ddff1 100644 --- a/src/server/routes/deploy/prebuilts/nftDrop.ts +++ b/src/server/routes/deploy/prebuilts/nft-drop.ts @@ -16,8 +16,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/pack.ts b/src/server/routes/deploy/prebuilts/pack.ts index e65685990..009ee543b 100644 --- a/src/server/routes/deploy/prebuilts/pack.ts +++ b/src/server/routes/deploy/prebuilts/pack.ts @@ -14,8 +14,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/signatureDrop.ts b/src/server/routes/deploy/prebuilts/signature-drop.ts similarity index 95% rename from src/server/routes/deploy/prebuilts/signatureDrop.ts rename to src/server/routes/deploy/prebuilts/signature-drop.ts index 05bb9c0a9..3656ae887 100644 --- a/src/server/routes/deploy/prebuilts/signatureDrop.ts +++ b/src/server/routes/deploy/prebuilts/signature-drop.ts @@ -16,8 +16,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/split.ts b/src/server/routes/deploy/prebuilts/split.ts index b0e1f15c9..8d81f2c6a 100644 --- a/src/server/routes/deploy/prebuilts/split.ts +++ b/src/server/routes/deploy/prebuilts/split.ts @@ -12,8 +12,8 @@ import { prebuiltDeployResponseSchema, splitRecipientInputSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/tokenDrop.ts b/src/server/routes/deploy/prebuilts/token-drop.ts similarity index 95% rename from src/server/routes/deploy/prebuilts/tokenDrop.ts rename to src/server/routes/deploy/prebuilts/token-drop.ts index b14b9f9cd..891ac65de 100644 --- a/src/server/routes/deploy/prebuilts/tokenDrop.ts +++ b/src/server/routes/deploy/prebuilts/token-drop.ts @@ -15,8 +15,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/token.ts b/src/server/routes/deploy/prebuilts/token.ts index ae2ffbb7e..f965aeef4 100644 --- a/src/server/routes/deploy/prebuilts/token.ts +++ b/src/server/routes/deploy/prebuilts/token.ts @@ -14,8 +14,8 @@ import { prebuiltDeployContractParamSchema, prebuiltDeployResponseSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/prebuilts/vote.ts b/src/server/routes/deploy/prebuilts/vote.ts index 292a1c151..87f50daae 100644 --- a/src/server/routes/deploy/prebuilts/vote.ts +++ b/src/server/routes/deploy/prebuilts/vote.ts @@ -12,8 +12,8 @@ import { prebuiltDeployResponseSchema, voteSettingsInputSchema, } from "../../../schemas/prebuilts"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../../schemas/txOverrides"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/deploy/published.ts b/src/server/routes/deploy/published.ts index 41bcb0f30..a4bcc9274 100644 --- a/src/server/routes/deploy/published.ts +++ b/src/server/routes/deploy/published.ts @@ -8,8 +8,8 @@ import { contractDeployBasicSchema } from "../../schemas/contract"; import { publishedDeployParamSchema, standardResponseSchema, -} from "../../schemas/sharedApiSchemas"; -import { txOverridesWithValueSchema } from "../../schemas/txOverrides"; +} from "../../schemas/shared-api-schemas"; +import { txOverridesWithValueSchema } from "../../schemas/tx-overrides"; import { walletWithAAHeaderSchema } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index 173698fea..b02317213 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -2,36 +2,36 @@ import type { FastifyInstance } from "fastify"; import { getNonceDetailsRoute } from "./admin/nonces"; import { getTransactionDetails } from "./admin/transaction"; import { createAccessToken } from "./auth/access-tokens/create"; -import { getAllAccessTokens } from "./auth/access-tokens/getAll"; +import { getAllAccessTokens } from "./auth/access-tokens/get-all"; import { revokeAccessToken } from "./auth/access-tokens/revoke"; import { updateAccessToken } from "./auth/access-tokens/update"; import { addKeypair } from "./auth/keypair/add"; import { listPublicKeys } from "./auth/keypair/list"; import { removePublicKey } from "./auth/keypair/remove"; -import { getAllPermissions } from "./auth/permissions/getAll"; +import { getAllPermissions } from "./auth/permissions/get-all"; import { grantPermissions } from "./auth/permissions/grant"; import { revokePermissions } from "./auth/permissions/revoke"; import { cancelBackendWalletNoncesRoute } from "./backend-wallet/cancel-nonces"; import { createBackendWallet } from "./backend-wallet/create"; -import { getAll } from "./backend-wallet/getAll"; -import { getBalance } from "./backend-wallet/getBalance"; -import { getBackendWalletNonce } from "./backend-wallet/getNonce"; -import { getTransactionsForBackendWallet } from "./backend-wallet/getTransactions"; -import { getTransactionsForBackendWalletByNonce } from "./backend-wallet/getTransactionsByNonce"; +import { getAll } from "./backend-wallet/get-all"; +import { getBalance } from "./backend-wallet/get-balance"; +import { getBackendWalletNonce } from "./backend-wallet/get-nonce"; +import { getTransactionsForBackendWallet } from "./backend-wallet/get-transactions"; +import { getTransactionsForBackendWalletByNonce } from "./backend-wallet/get-transactions-by-nonce"; import { importBackendWallet } from "./backend-wallet/import"; import { removeBackendWallet } from "./backend-wallet/remove"; import { resetBackendWalletNoncesRoute } from "./backend-wallet/reset-nonces"; -import { sendTransaction } from "./backend-wallet/sendTransaction"; -import { sendTransactionBatch } from "./backend-wallet/sendTransactionBatch"; -import { signMessageRoute } from "./backend-wallet/signMessage"; -import { signTransaction } from "./backend-wallet/signTransaction"; -import { signTypedData } from "./backend-wallet/signTypedData"; -import { simulateTransaction } from "./backend-wallet/simulateTransaction"; +import { sendTransaction } from "./backend-wallet/send-transaction"; +import { sendTransactionBatch } from "./backend-wallet/send-transaction-batch"; +import { signMessageRoute } from "./backend-wallet/sign-message"; +import { signTransaction } from "./backend-wallet/sign-transaction"; +import { signTypedData } from "./backend-wallet/sign-typed-data"; +import { simulateTransaction } from "./backend-wallet/simulate-transaction"; import { transfer } from "./backend-wallet/transfer"; import { updateBackendWallet } from "./backend-wallet/update"; import { withdraw } from "./backend-wallet/withdraw"; import { getChainData } from "./chain/get"; -import { getAllChainData } from "./chain/getAll"; +import { getAllChainData } from "./chain/get-all"; import { getAuthConfiguration } from "./configuration/auth/get"; import { updateAuthConfiguration } from "./configuration/auth/update"; import { getBackendWalletBalanceConfiguration } from "./configuration/backend-wallet-balance/get"; @@ -52,63 +52,63 @@ import { getTransactionConfiguration } from "./configuration/transactions/get"; import { updateTransactionConfiguration } from "./configuration/transactions/update"; import { getWalletsConfiguration } from "./configuration/wallets/get"; import { updateWalletsConfiguration } from "./configuration/wallets/update"; -import { getAllEvents } from "./contract/events/getAllEvents"; -import { getContractEventLogs } from "./contract/events/getContractEventLogs"; -import { getEventLogs } from "./contract/events/getEventLogsByTimestamp"; -import { getEvents } from "./contract/events/getEvents"; -import { pageEventLogs } from "./contract/events/paginateEventLogs"; +import { getAllEvents } from "./contract/events/get-all-events"; +import { getContractEventLogs } from "./contract/events/get-contract-event-logs"; +import { getEventLogs } from "./contract/events/get-event-logs-by-timestamp"; +import { getEvents } from "./contract/events/get-events"; +import { pageEventLogs } from "./contract/events/paginate-event-logs"; import { accountRoutes } from "./contract/extensions/account"; -import { accountFactoryRoutes } from "./contract/extensions/accountFactory"; +import { accountFactoryRoutes } from "./contract/extensions/account-factory"; import { erc1155Routes } from "./contract/extensions/erc1155"; import { erc20Routes } from "./contract/extensions/erc20"; import { erc721Routes } from "./contract/extensions/erc721"; -import { marketplaceV3Routes } from "./contract/extensions/marketplaceV3/index"; +import { marketplaceV3Routes } from "./contract/extensions/marketplace-v3/index"; import { getABI } from "./contract/metadata/abi"; import { extractEvents } from "./contract/metadata/events"; import { getContractExtensions } from "./contract/metadata/extensions"; import { extractFunctions } from "./contract/metadata/functions"; import { readContract } from "./contract/read/read"; import { getRoles } from "./contract/roles/read/get"; -import { getAllRoles } from "./contract/roles/read/getAll"; +import { getAllRoles } from "./contract/roles/read/get-all"; import { grantRole } from "./contract/roles/write/grant"; import { revokeRole } from "./contract/roles/write/revoke"; -import { getDefaultRoyaltyInfo } from "./contract/royalties/read/getDefaultRoyaltyInfo"; -import { getTokenRoyaltyInfo } from "./contract/royalties/read/getTokenRoyaltyInfo"; -import { setDefaultRoyaltyInfo } from "./contract/royalties/write/setDefaultRoyaltyInfo"; -import { setTokenRoyaltyInfo } from "./contract/royalties/write/setTokenRoyaltyInfo"; -import { addContractSubscription } from "./contract/subscriptions/addContractSubscription"; -import { getContractIndexedBlockRange } from "./contract/subscriptions/getContractIndexedBlockRange"; -import { getContractSubscriptions } from "./contract/subscriptions/getContractSubscriptions"; -import { getLatestBlock } from "./contract/subscriptions/getLatestBlock"; -import { removeContractSubscription } from "./contract/subscriptions/removeContractSubscription"; -import { getContractTransactionReceipts } from "./contract/transactions/getTransactionReceipts"; -import { getContractTransactionReceiptsByTimestamp } from "./contract/transactions/getTransactionReceiptsByTimestamp"; -import { pageTransactionReceipts } from "./contract/transactions/paginateTransactionReceipts"; +import { getDefaultRoyaltyInfo } from "./contract/royalties/read/get-default-royalty-info"; +import { getTokenRoyaltyInfo } from "./contract/royalties/read/get-token-royalty-info"; +import { setDefaultRoyaltyInfo } from "./contract/royalties/write/set-default-royalty-info"; +import { setTokenRoyaltyInfo } from "./contract/royalties/write/set-token-royalty-info"; +import { addContractSubscription } from "./contract/subscriptions/add-contract-subscription"; +import { getContractIndexedBlockRange } from "./contract/subscriptions/get-contract-indexed-block-range"; +import { getContractSubscriptions } from "./contract/subscriptions/get-contract-subscriptions"; +import { getLatestBlock } from "./contract/subscriptions/get-latest-block"; +import { removeContractSubscription } from "./contract/subscriptions/remove-contract-subscription"; +import { getContractTransactionReceipts } from "./contract/transactions/get-transaction-receipts"; +import { getContractTransactionReceiptsByTimestamp } from "./contract/transactions/get-transaction-receipts-by-timestamp"; +import { pageTransactionReceipts } from "./contract/transactions/paginate-transaction-receipts"; import { writeToContract } from "./contract/write/write"; import { prebuiltsRoutes } from "./deploy"; import { home } from "./home"; import { relayTransaction } from "./relayer"; import { createRelayer } from "./relayer/create"; -import { getAllRelayers } from "./relayer/getAll"; +import { getAllRelayers } from "./relayer/get-all"; import { revokeRelayer } from "./relayer/revoke"; import { updateRelayer } from "./relayer/update"; import { healthCheck } from "./system/health"; import { queueStatus } from "./system/queue"; -import { getTransactionLogs } from "./transaction/blockchain/getLogs"; -import { getTransactionReceipt } from "./transaction/blockchain/getReceipt"; -import { getUserOpReceipt } from "./transaction/blockchain/getUserOpReceipt"; -import { sendSignedTransaction } from "./transaction/blockchain/sendSignedTx"; -import { sendSignedUserOp } from "./transaction/blockchain/sendSignedUserOp"; +import { getTransactionLogs } from "./transaction/blockchain/get-logs"; +import { getTransactionReceipt } from "./transaction/blockchain/get-receipt"; +import { getUserOpReceipt } from "./transaction/blockchain/get-user-op-receipt"; +import { sendSignedTransaction } from "./transaction/blockchain/send-signed-tx"; +import { sendSignedUserOp } from "./transaction/blockchain/send-signed-user-op"; import { cancelTransaction } from "./transaction/cancel"; -import { getAllTransactions } from "./transaction/getAll"; -import { getAllDeployedContracts } from "./transaction/getAllDeployedContracts"; +import { getAllTransactions } from "./transaction/get-all"; +import { getAllDeployedContracts } from "./transaction/get-all-deployed-contracts"; import { retryTransaction } from "./transaction/retry"; import { retryFailedTransactionRoute } from "./transaction/retry-failed"; import { checkTxStatus } from "./transaction/status"; import { syncRetryTransactionRoute } from "./transaction/sync-retry"; import { createWebhookRoute } from "./webhooks/create"; import { getWebhooksEventTypes } from "./webhooks/events"; -import { getAllWebhooksData } from "./webhooks/getAll"; +import { getAllWebhooksData } from "./webhooks/get-all"; import { revokeWebhook } from "./webhooks/revoke"; import { testWebhookRoute } from "./webhooks/test"; diff --git a/src/server/routes/relayer/create.ts b/src/server/routes/relayer/create.ts index f7b34d05f..975a93c12 100644 --- a/src/server/routes/relayer/create.ts +++ b/src/server/routes/relayer/create.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; import { chainIdOrSlugSchema } from "../../schemas/chain"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../utils/chain"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/relayer/getAll.ts b/src/server/routes/relayer/get-all.ts similarity index 95% rename from src/server/routes/relayer/getAll.ts rename to src/server/routes/relayer/get-all.ts index 3798b5e67..59ce734b7 100644 --- a/src/server/routes/relayer/getAll.ts +++ b/src/server/routes/relayer/get-all.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const responseBodySchema = Type.Object({ result: Type.Array( diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index a624ce74d..c93e22077 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -16,7 +16,7 @@ import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema, transactionWritesResponseSchema, -} from "../../schemas/sharedApiSchemas"; +} from "../../schemas/shared-api-schemas"; const ParamsSchema = Type.Object({ relayerId: Type.String(), diff --git a/src/server/routes/relayer/revoke.ts b/src/server/routes/relayer/revoke.ts index aa84eb1ad..3ceedb940 100644 --- a/src/server/routes/relayer/revoke.ts +++ b/src/server/routes/relayer/revoke.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../shared/db/client"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ id: Type.String(), diff --git a/src/server/routes/relayer/update.ts b/src/server/routes/relayer/update.ts index 421ac46af..ed55603ef 100644 --- a/src/server/routes/relayer/update.ts +++ b/src/server/routes/relayer/update.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../shared/db/client"; import { AddressSchema } from "../../schemas/address"; import { chainIdOrSlugSchema } from "../../schemas/chain"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../utils/chain"; const requestBodySchema = Type.Object({ diff --git a/src/server/routes/system/queue.ts b/src/server/routes/system/queue.ts index 8c01d2302..38b1c52e4 100644 --- a/src/server/routes/system/queue.ts +++ b/src/server/routes/system/queue.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../shared/db/transactions/db"; import { getPercentile } from "../../../shared/utils/math"; import type { MinedTransaction } from "../../../shared/utils/transaction/types"; -import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; -import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { MineTransactionQueue } from "../../../worker/queues/mine-transaction-queue"; +import { SendTransactionQueue } from "../../../worker/queues/send-transaction-queue"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const responseBodySchema = Type.Object({ result: Type.Object({ diff --git a/src/server/routes/transaction/blockchain/getLogs.ts b/src/server/routes/transaction/blockchain/get-logs.ts similarity index 98% rename from src/server/routes/transaction/blockchain/getLogs.ts rename to src/server/routes/transaction/blockchain/get-logs.ts index 099dc246d..171e1262d 100644 --- a/src/server/routes/transaction/blockchain/getLogs.ts +++ b/src/server/routes/transaction/blockchain/get-logs.ts @@ -19,7 +19,7 @@ import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; // INPUT diff --git a/src/server/routes/transaction/blockchain/getReceipt.ts b/src/server/routes/transaction/blockchain/get-receipt.ts similarity index 98% rename from src/server/routes/transaction/blockchain/getReceipt.ts rename to src/server/routes/transaction/blockchain/get-receipt.ts index b5d3c4378..e3473026b 100644 --- a/src/server/routes/transaction/blockchain/getReceipt.ts +++ b/src/server/routes/transaction/blockchain/get-receipt.ts @@ -18,7 +18,7 @@ import { import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; // INPUT diff --git a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts b/src/server/routes/transaction/blockchain/get-user-op-receipt.ts similarity index 98% rename from src/server/routes/transaction/blockchain/getUserOpReceipt.ts rename to src/server/routes/transaction/blockchain/get-user-op-receipt.ts index 220add1ae..8851a252a 100644 --- a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts +++ b/src/server/routes/transaction/blockchain/get-user-op-receipt.ts @@ -5,7 +5,7 @@ import { env } from "../../../../shared/utils/env"; import { createCustomError } from "../../../middleware/error"; import { TransactionHashSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { getChainIdFromChain } from "../../../utils/chain"; // INPUT diff --git a/src/server/routes/transaction/blockchain/sendSignedTx.ts b/src/server/routes/transaction/blockchain/send-signed-tx.ts similarity index 96% rename from src/server/routes/transaction/blockchain/sendSignedTx.ts rename to src/server/routes/transaction/blockchain/send-signed-tx.ts index fe7e1ac83..862fc261b 100644 --- a/src/server/routes/transaction/blockchain/sendSignedTx.ts +++ b/src/server/routes/transaction/blockchain/send-signed-tx.ts @@ -6,7 +6,7 @@ import { getChain } from "../../../../shared/utils/chain"; import { thirdwebClient } from "../../../../shared/utils/sdk"; import { createCustomError } from "../../../middleware/error"; import { TransactionHashSchema } from "../../../schemas/address"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts b/src/server/routes/transaction/blockchain/send-signed-user-op.ts similarity index 97% rename from src/server/routes/transaction/blockchain/sendSignedUserOp.ts rename to src/server/routes/transaction/blockchain/send-signed-user-op.ts index 8db91f8e3..cdccaf42d 100644 --- a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts +++ b/src/server/routes/transaction/blockchain/send-signed-user-op.ts @@ -5,7 +5,7 @@ import { StatusCodes } from "http-status-codes"; import { env } from "../../../../shared/utils/env"; import { thirdwebClientId } from "../../../../shared/utils/sdk"; import { TransactionHashSchema } from "../../../schemas/address"; -import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index cd06f9354..9db14dd39 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -10,10 +10,10 @@ import { sendCancellationTransaction } from "../../../shared/utils/transaction/c import type { CancelledTransaction } from "../../../shared/utils/transaction/types"; import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; import { reportUsage } from "../../../shared/utils/usage"; -import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; +import { SendTransactionQueue } from "../../../worker/queues/send-transaction-queue"; import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; // INPUT const requestBodySchema = Type.Object({ diff --git a/src/server/routes/transaction/getAllDeployedContracts.ts b/src/server/routes/transaction/get-all-deployed-contracts.ts similarity index 98% rename from src/server/routes/transaction/getAllDeployedContracts.ts rename to src/server/routes/transaction/get-all-deployed-contracts.ts index d4745f9ad..11802e01d 100644 --- a/src/server/routes/transaction/getAllDeployedContracts.ts +++ b/src/server/routes/transaction/get-all-deployed-contracts.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../shared/db/transactions/db"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { TransactionSchema, toTransactionSchema, diff --git a/src/server/routes/transaction/getAll.ts b/src/server/routes/transaction/get-all.ts similarity index 98% rename from src/server/routes/transaction/getAll.ts rename to src/server/routes/transaction/get-all.ts index 6243e0fc7..c18e875dd 100644 --- a/src/server/routes/transaction/getAll.ts +++ b/src/server/routes/transaction/get-all.ts @@ -3,7 +3,7 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../shared/db/transactions/db"; import { PaginationSchema } from "../../schemas/pagination"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { TransactionSchema, toTransactionSchema, diff --git a/src/server/routes/transaction/retry-failed.ts b/src/server/routes/transaction/retry-failed.ts index 1550a97ca..cf42c54b4 100644 --- a/src/server/routes/transaction/retry-failed.ts +++ b/src/server/routes/transaction/retry-failed.ts @@ -7,10 +7,10 @@ import { getReceiptForUserOp, } from "../../../shared/lib/transaction/get-transaction-receipt"; import type { QueuedTransaction } from "../../../shared/utils/transaction/types"; -import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; -import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; +import { MineTransactionQueue } from "../../../worker/queues/mine-transaction-queue"; +import { SendTransactionQueue } from "../../../worker/queues/send-transaction-queue"; import { createCustomError } from "../../middleware/error"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ queueId: Type.String({ diff --git a/src/server/routes/transaction/retry.ts b/src/server/routes/transaction/retry.ts index 21743f725..8d058a95e 100644 --- a/src/server/routes/transaction/retry.ts +++ b/src/server/routes/transaction/retry.ts @@ -4,9 +4,9 @@ import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../shared/db/transactions/db"; import { maybeBigInt } from "../../../shared/utils/primitive-types"; import type { SentTransaction } from "../../../shared/utils/transaction/types"; -import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; +import { SendTransactionQueue } from "../../../worker/queues/send-transaction-queue"; import { createCustomError } from "../../middleware/error"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ queueId: Type.String({ diff --git a/src/server/routes/transaction/status.ts b/src/server/routes/transaction/status.ts index 616009cbf..d597de3df 100644 --- a/src/server/routes/transaction/status.ts +++ b/src/server/routes/transaction/status.ts @@ -5,7 +5,7 @@ import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../shared/db/transactions/db"; import { logger } from "../../../shared/utils/logger"; import { createCustomError } from "../../middleware/error"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { TransactionSchema, toTransactionSchema, diff --git a/src/server/routes/transaction/sync-retry.ts b/src/server/routes/transaction/sync-retry.ts index b0b45b8a6..e212afc9a 100644 --- a/src/server/routes/transaction/sync-retry.ts +++ b/src/server/routes/transaction/sync-retry.ts @@ -14,10 +14,10 @@ import { import { thirdwebClient } from "../../../shared/utils/sdk"; import type { SentTransaction } from "../../../shared/utils/transaction/types"; import { enqueueTransactionWebhook } from "../../../shared/utils/transaction/webhook"; -import { MineTransactionQueue } from "../../../worker/queues/mineTransactionQueue"; +import { MineTransactionQueue } from "../../../worker/queues/mine-transaction-queue"; import { createCustomError } from "../../middleware/error"; import { TransactionHashSchema } from "../../schemas/address"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ queueId: Type.String({ diff --git a/src/server/routes/webhooks/create.ts b/src/server/routes/webhooks/create.ts index 986fa6743..3d18768f8 100644 --- a/src/server/routes/webhooks/create.ts +++ b/src/server/routes/webhooks/create.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; import { insertWebhook } from "../../../shared/db/webhooks/create-webhook"; import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; import { createCustomError } from "../../middleware/error"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { WebhookSchema, toWebhookSchema } from "../../schemas/webhook"; import { isValidWebhookUrl } from "../../utils/validator"; diff --git a/src/server/routes/webhooks/events.ts b/src/server/routes/webhooks/events.ts index 35f636d0b..4ad95e28a 100644 --- a/src/server/routes/webhooks/events.ts +++ b/src/server/routes/webhooks/events.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; export const responseBodySchema = Type.Object({ result: Type.Array(Type.Enum(WebhooksEventTypes)), diff --git a/src/server/routes/webhooks/getAll.ts b/src/server/routes/webhooks/get-all.ts similarity index 93% rename from src/server/routes/webhooks/getAll.ts rename to src/server/routes/webhooks/get-all.ts index 5b342cd7a..a30a56194 100644 --- a/src/server/routes/webhooks/getAll.ts +++ b/src/server/routes/webhooks/get-all.ts @@ -2,7 +2,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/get-all-webhooks"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import { WebhookSchema, toWebhookSchema } from "../../schemas/webhook"; const responseBodySchema = Type.Object({ diff --git a/src/server/routes/webhooks/revoke.ts b/src/server/routes/webhooks/revoke.ts index de943d16d..6e38245de 100644 --- a/src/server/routes/webhooks/revoke.ts +++ b/src/server/routes/webhooks/revoke.ts @@ -4,7 +4,7 @@ import { StatusCodes } from "http-status-codes"; 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"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; const requestBodySchema = Type.Object({ id: Type.Integer({ minimum: 0 }), diff --git a/src/server/routes/webhooks/test.ts b/src/server/routes/webhooks/test.ts index 0031a7580..d61861f0f 100644 --- a/src/server/routes/webhooks/test.ts +++ b/src/server/routes/webhooks/test.ts @@ -5,7 +5,7 @@ import { getWebhook } from "../../../shared/db/webhooks/get-webhook"; import { sendWebhookRequest } from "../../../shared/utils/webhook"; import { createCustomError } from "../../middleware/error"; import { NumberStringSchema } from "../../schemas/number"; -import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; +import { standardResponseSchema } from "../../schemas/shared-api-schemas"; import type { TransactionSchema } from "../../schemas/transaction"; const paramsSchema = Type.Object({ diff --git a/src/server/schemas/claimConditions/index.ts b/src/server/schemas/claim-conditions/index.ts similarity index 98% rename from src/server/schemas/claimConditions/index.ts rename to src/server/schemas/claim-conditions/index.ts index d316654bd..11b867a10 100644 --- a/src/server/schemas/claimConditions/index.ts +++ b/src/server/schemas/claim-conditions/index.ts @@ -1,6 +1,6 @@ import { Type } from "@sinclair/typebox"; import { AddressSchema } from "../address"; -import { currencyValueSchema } from "../sharedApiSchemas"; +import { currencyValueSchema } from "../shared-api-schemas"; export const claimConditionInputSchema = Type.Object({ maxClaimableSupply: Type.Optional( diff --git a/src/server/schemas/contractSubscription.ts b/src/server/schemas/contract-subscription.ts similarity index 100% rename from src/server/schemas/contractSubscription.ts rename to src/server/schemas/contract-subscription.ts diff --git a/src/server/schemas/contract/index.ts b/src/server/schemas/contract/index.ts index ed27ac8e6..d6abd42eb 100644 --- a/src/server/schemas/contract/index.ts +++ b/src/server/schemas/contract/index.ts @@ -1,6 +1,6 @@ import { Type, type Static } from "@sinclair/typebox"; import { AddressSchema } from "../address"; -import type { contractSchemaTypes } from "../sharedApiSchemas"; +import type { contractSchemaTypes } from "../shared-api-schemas"; /** * Basic schema for all Request Query String diff --git a/src/server/schemas/eventLog.ts b/src/server/schemas/event-log.ts similarity index 100% rename from src/server/schemas/eventLog.ts rename to src/server/schemas/event-log.ts diff --git a/src/server/schemas/httpHeaders/thirdwebSdkVersion.ts b/src/server/schemas/http-headers/thirdweb-sdk-version.ts similarity index 100% rename from src/server/schemas/httpHeaders/thirdwebSdkVersion.ts rename to src/server/schemas/http-headers/thirdweb-sdk-version.ts diff --git a/src/server/schemas/marketplaceV3/directListing/index.ts b/src/server/schemas/marketplace-v3/direct-listing/index.ts similarity index 97% rename from src/server/schemas/marketplaceV3/directListing/index.ts rename to src/server/schemas/marketplace-v3/direct-listing/index.ts index 317b4c4de..bbd2b3f0b 100644 --- a/src/server/schemas/marketplaceV3/directListing/index.ts +++ b/src/server/schemas/marketplace-v3/direct-listing/index.ts @@ -1,7 +1,7 @@ import { Type } from "@sinclair/typebox"; import { AddressSchema } from "../../address"; import { nftMetadataSchema } from "../../nft"; -import { Status, currencyValueSchema } from "../../sharedApiSchemas"; +import { Status, currencyValueSchema } from "../../shared-api-schemas"; export const directListingV3InputSchema = Type.Object({ assetContractAddress: { diff --git a/src/server/schemas/marketplaceV3/englishAuction/index.ts b/src/server/schemas/marketplace-v3/english-auction/index.ts similarity index 98% rename from src/server/schemas/marketplaceV3/englishAuction/index.ts rename to src/server/schemas/marketplace-v3/english-auction/index.ts index e2298d686..59263451a 100644 --- a/src/server/schemas/marketplaceV3/englishAuction/index.ts +++ b/src/server/schemas/marketplace-v3/english-auction/index.ts @@ -1,7 +1,7 @@ import { Type } from "@sinclair/typebox"; import { AddressSchema } from "../../address"; import { nftMetadataSchema } from "../../nft"; -import { Status } from "../../sharedApiSchemas"; +import { Status } from "../../shared-api-schemas"; const currencyValueSchema = Type.Object({ name: Type.Optional(Type.String()), diff --git a/src/server/schemas/marketplaceV3/offer/index.ts b/src/server/schemas/marketplace-v3/offer/index.ts similarity index 97% rename from src/server/schemas/marketplaceV3/offer/index.ts rename to src/server/schemas/marketplace-v3/offer/index.ts index 7454cad3b..0d7a2834a 100644 --- a/src/server/schemas/marketplaceV3/offer/index.ts +++ b/src/server/schemas/marketplace-v3/offer/index.ts @@ -1,7 +1,7 @@ import { Type } from "@sinclair/typebox"; import { AddressSchema } from "../../address"; import { nftMetadataSchema } from "../../nft"; -import { Status, currencyValueSchema } from "../../sharedApiSchemas"; +import { Status, currencyValueSchema } from "../../shared-api-schemas"; export const OfferV3InputSchema = Type.Object({ assetContractAddress: { diff --git a/src/server/schemas/sharedApiSchemas.ts b/src/server/schemas/shared-api-schemas.ts similarity index 100% rename from src/server/schemas/sharedApiSchemas.ts rename to src/server/schemas/shared-api-schemas.ts diff --git a/src/server/schemas/transactionReceipt.ts b/src/server/schemas/transaction-receipt.ts similarity index 100% rename from src/server/schemas/transactionReceipt.ts rename to src/server/schemas/transaction-receipt.ts diff --git a/src/server/schemas/txOverrides.ts b/src/server/schemas/tx-overrides.ts similarity index 100% rename from src/server/schemas/txOverrides.ts rename to src/server/schemas/tx-overrides.ts diff --git a/src/server/utils/marketplaceV3.ts b/src/server/utils/marketplace-v3.ts similarity index 100% rename from src/server/utils/marketplaceV3.ts rename to src/server/utils/marketplace-v3.ts diff --git a/src/server/utils/storage/localStorage.ts b/src/server/utils/storage/local-storage.ts similarity index 100% rename from src/server/utils/storage/localStorage.ts rename to src/server/utils/storage/local-storage.ts diff --git a/src/server/utils/transactionOverrides.ts b/src/server/utils/transaction-overrides.ts similarity index 96% rename from src/server/utils/transactionOverrides.ts rename to src/server/utils/transaction-overrides.ts index d7c8e9fcf..443758ef0 100644 --- a/src/server/utils/transactionOverrides.ts +++ b/src/server/utils/transaction-overrides.ts @@ -4,7 +4,7 @@ import type { InsertedTransaction } from "../../shared/utils/transaction/types"; import type { txOverridesSchema, txOverridesWithValueSchema, -} from "../schemas/txOverrides"; +} from "../schemas/tx-overrides"; export const parseTransactionOverrides = ( overrides: diff --git a/src/server/utils/wallets/awsKmsArn.ts b/src/server/utils/wallets/aws-kms-arn.ts similarity index 100% rename from src/server/utils/wallets/awsKmsArn.ts rename to src/server/utils/wallets/aws-kms-arn.ts diff --git a/src/server/utils/wallets/createAwsKmsWallet.ts b/src/server/utils/wallets/create-aws-kms-wallet.ts similarity index 95% rename from src/server/utils/wallets/createAwsKmsWallet.ts rename to src/server/utils/wallets/create-aws-kms-wallet.ts index 1d4b75b50..1398db8c0 100644 --- a/src/server/utils/wallets/createAwsKmsWallet.ts +++ b/src/server/utils/wallets/create-aws-kms-wallet.ts @@ -3,8 +3,8 @@ import { FetchAwsKmsWalletParamsError, fetchAwsKmsWalletParams, type AwsKmsWalletParams, -} from "./fetchAwsKmsWalletParams"; -import { importAwsKmsWallet } from "./importAwsKmsWallet"; +} from "./fetch-aws-kms-wallet-params"; +import { importAwsKmsWallet } from "./import-aws-kms-wallet"; export type CreateAwsKmsWalletParams = { label?: string; diff --git a/src/server/utils/wallets/createGcpKmsWallet.ts b/src/server/utils/wallets/create-gcp-kms-wallet.ts similarity index 95% rename from src/server/utils/wallets/createGcpKmsWallet.ts rename to src/server/utils/wallets/create-gcp-kms-wallet.ts index d45fd0835..7a040f760 100644 --- a/src/server/utils/wallets/createGcpKmsWallet.ts +++ b/src/server/utils/wallets/create-gcp-kms-wallet.ts @@ -6,9 +6,9 @@ import { FetchGcpKmsWalletParamsError, fetchGcpKmsWalletParams, type GcpKmsWalletParams, -} from "./fetchGcpKmsWalletParams"; -import { getGcpKmsResourcePath } from "./gcpKmsResourcePath"; -import { getGcpKmsAccount } from "./getGcpKmsAccount"; +} from "./fetch-gcp-kms-wallet-params"; +import { getGcpKmsResourcePath } from "./gcp-kms-resource-path"; +import { getGcpKmsAccount } from "./get-gcp-kms-account"; export type CreateGcpKmsWalletParams = { label?: string; diff --git a/src/server/utils/wallets/createLocalWallet.ts b/src/server/utils/wallets/create-local-wallet.ts similarity index 100% rename from src/server/utils/wallets/createLocalWallet.ts rename to src/server/utils/wallets/create-local-wallet.ts diff --git a/src/server/utils/wallets/createSmartWallet.ts b/src/server/utils/wallets/create-smart-wallet.ts similarity index 93% rename from src/server/utils/wallets/createSmartWallet.ts rename to src/server/utils/wallets/create-smart-wallet.ts index d2e45a166..555f6e70f 100644 --- a/src/server/utils/wallets/createSmartWallet.ts +++ b/src/server/utils/wallets/create-smart-wallet.ts @@ -3,18 +3,18 @@ import { smartWallet, type Account } from "thirdweb/wallets"; 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"; +import { splitAwsKmsArn } from "./aws-kms-arn"; import { createAwsKmsKey, type CreateAwsKmsWalletParams, -} from "./createAwsKmsWallet"; +} from "./create-aws-kms-wallet"; import { createGcpKmsKey, type CreateGcpKmsWalletParams, -} from "./createGcpKmsWallet"; -import { generateLocalWallet } from "./createLocalWallet"; -import { getAwsKmsAccount } from "./getAwsKmsAccount"; -import { getGcpKmsAccount } from "./getGcpKmsAccount"; +} from "./create-gcp-kms-wallet"; +import { generateLocalWallet } from "./create-local-wallet"; +import { getAwsKmsAccount } from "./get-aws-kms-account"; +import { getGcpKmsAccount } from "./get-gcp-kms-account"; /** * Get a smart wallet address for a given admin account diff --git a/src/server/utils/wallets/fetchAwsKmsWalletParams.ts b/src/server/utils/wallets/fetch-aws-kms-wallet-params.ts similarity index 100% rename from src/server/utils/wallets/fetchAwsKmsWalletParams.ts rename to src/server/utils/wallets/fetch-aws-kms-wallet-params.ts diff --git a/src/server/utils/wallets/fetchGcpKmsWalletParams.ts b/src/server/utils/wallets/fetch-gcp-kms-wallet-params.ts similarity index 100% rename from src/server/utils/wallets/fetchGcpKmsWalletParams.ts rename to src/server/utils/wallets/fetch-gcp-kms-wallet-params.ts diff --git a/src/server/utils/wallets/gcpKmsResourcePath.ts b/src/server/utils/wallets/gcp-kms-resource-path.ts similarity index 100% rename from src/server/utils/wallets/gcpKmsResourcePath.ts rename to src/server/utils/wallets/gcp-kms-resource-path.ts diff --git a/src/server/utils/wallets/getAwsKmsAccount.ts b/src/server/utils/wallets/get-aws-kms-account.ts similarity index 100% rename from src/server/utils/wallets/getAwsKmsAccount.ts rename to src/server/utils/wallets/get-aws-kms-account.ts diff --git a/src/server/utils/wallets/getGcpKmsAccount.ts b/src/server/utils/wallets/get-gcp-kms-account.ts similarity index 100% rename from src/server/utils/wallets/getGcpKmsAccount.ts rename to src/server/utils/wallets/get-gcp-kms-account.ts diff --git a/src/server/utils/wallets/getLocalWallet.ts b/src/server/utils/wallets/get-local-wallet.ts similarity index 97% rename from src/server/utils/wallets/getLocalWallet.ts rename to src/server/utils/wallets/get-local-wallet.ts index ec4756789..1a9d4e040 100644 --- a/src/server/utils/wallets/getLocalWallet.ts +++ b/src/server/utils/wallets/get-local-wallet.ts @@ -9,7 +9,7 @@ import { env } from "../../../shared/utils/env"; import { logger } from "../../../shared/utils/logger"; import { thirdwebClient } from "../../../shared/utils/sdk"; import { badChainError } from "../../middleware/error"; -import { LocalFileStorage } from "../storage/localStorage"; +import { LocalFileStorage } from "../storage/local-storage"; interface GetLocalWalletParams { chainId: number; diff --git a/src/server/utils/wallets/getSmartWallet.ts b/src/server/utils/wallets/get-smart-wallet.ts similarity index 100% rename from src/server/utils/wallets/getSmartWallet.ts rename to src/server/utils/wallets/get-smart-wallet.ts diff --git a/src/server/utils/wallets/importAwsKmsWallet.ts b/src/server/utils/wallets/import-aws-kms-wallet.ts similarity index 91% rename from src/server/utils/wallets/importAwsKmsWallet.ts rename to src/server/utils/wallets/import-aws-kms-wallet.ts index da394e32e..364a2c0af 100644 --- a/src/server/utils/wallets/importAwsKmsWallet.ts +++ b/src/server/utils/wallets/import-aws-kms-wallet.ts @@ -1,8 +1,8 @@ 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"; -import { getAwsKmsAccount } from "./getAwsKmsAccount"; +import { splitAwsKmsArn } from "./aws-kms-arn"; +import { getAwsKmsAccount } from "./get-aws-kms-account"; interface ImportAwsKmsWalletParams { awsKmsArn: string; diff --git a/src/server/utils/wallets/importGcpKmsWallet.ts b/src/server/utils/wallets/import-gcp-kms-wallet.ts similarity index 95% rename from src/server/utils/wallets/importGcpKmsWallet.ts rename to src/server/utils/wallets/import-gcp-kms-wallet.ts index 57246ca78..5925ba503 100644 --- a/src/server/utils/wallets/importGcpKmsWallet.ts +++ b/src/server/utils/wallets/import-gcp-kms-wallet.ts @@ -1,7 +1,7 @@ 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"; +import { getGcpKmsAccount } from "./get-gcp-kms-account"; interface ImportGcpKmsWalletParams { gcpKmsResourcePath: string; diff --git a/src/server/utils/wallets/importLocalWallet.ts b/src/server/utils/wallets/import-local-wallet.ts similarity index 95% rename from src/server/utils/wallets/importLocalWallet.ts rename to src/server/utils/wallets/import-local-wallet.ts index a917c484f..38762f559 100644 --- a/src/server/utils/wallets/importLocalWallet.ts +++ b/src/server/utils/wallets/import-local-wallet.ts @@ -1,6 +1,6 @@ import { LocalWallet } from "@thirdweb-dev/wallets"; import { env } from "../../../shared/utils/env"; -import { LocalFileStorage } from "../storage/localStorage"; +import { LocalFileStorage } from "../storage/local-storage"; type ImportLocalWalletParams = | { diff --git a/src/shared/db/transactions/queue-tx.ts b/src/shared/db/transactions/queue-tx.ts index 181142fa8..e6a63843b 100644 --- a/src/shared/db/transactions/queue-tx.ts +++ b/src/shared/db/transactions/queue-tx.ts @@ -5,7 +5,7 @@ import type { ContractExtension } from "../../schemas/extension"; import { maybeBigInt, normalizeAddress } from "../../utils/primitive-types"; import { insertTransaction } from "../../utils/transaction/insert-transaction"; import type { InsertedTransaction } from "../../utils/transaction/types"; -import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; +import { parseTransactionOverrides } from "../../../server/utils/transaction-overrides"; interface QueueTxParams { // we should move away from Transaction type (v4 SDK) diff --git a/src/shared/utils/account.ts b/src/shared/utils/account.ts index 72126e9e7..496071e3d 100644 --- a/src/shared/utils/account.ts +++ b/src/shared/utils/account.ts @@ -7,14 +7,14 @@ import { type ParsedWalletDetails, } 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"; -import { getAwsKmsAccount } from "../../server/utils/wallets/getAwsKmsAccount"; -import { getGcpKmsAccount } from "../../server/utils/wallets/getGcpKmsAccount"; +import { splitAwsKmsArn } from "../../server/utils/wallets/aws-kms-arn"; +import { getConnectedSmartWallet } from "../../server/utils/wallets/create-smart-wallet"; +import { getAwsKmsAccount } from "../../server/utils/wallets/get-aws-kms-account"; +import { getGcpKmsAccount } from "../../server/utils/wallets/get-gcp-kms-account"; import { encryptedJsonToAccount, getLocalWalletAccount, -} from "../../server/utils/wallets/getLocalWallet"; +} from "../../server/utils/wallets/get-local-wallet"; import { getSmartWalletV5 } from "./cache/get-smart-wallet-v5"; import { getChain } from "./chain"; import { thirdwebClient } from "./sdk"; diff --git a/src/shared/utils/cache/get-wallet.ts b/src/shared/utils/cache/get-wallet.ts index 7ad7cdecb..4f3533410 100644 --- a/src/shared/utils/cache/get-wallet.ts +++ b/src/shared/utils/cache/get-wallet.ts @@ -10,10 +10,10 @@ import { import type { PrismaTransaction } from "../../schemas/prisma"; import { WalletType } from "../../schemas/wallet"; import { createCustomError } from "../../../server/middleware/error"; -import { splitAwsKmsArn } from "../../../server/utils/wallets/awsKmsArn"; -import { splitGcpKmsResourcePath } from "../../../server/utils/wallets/gcpKmsResourcePath"; -import { getLocalWallet } from "../../../server/utils/wallets/getLocalWallet"; -import { getSmartWallet } from "../../../server/utils/wallets/getSmartWallet"; +import { splitAwsKmsArn } from "../../../server/utils/wallets/aws-kms-arn"; +import { splitGcpKmsResourcePath } from "../../../server/utils/wallets/gcp-kms-resource-path"; +import { getLocalWallet } from "../../../server/utils/wallets/get-local-wallet"; +import { getSmartWallet } from "../../../server/utils/wallets/get-smart-wallet"; export const walletsCache = new LRUMap(2048); diff --git a/src/shared/utils/transaction/insert-transaction.ts b/src/shared/utils/transaction/insert-transaction.ts index 69737784f..625088a30 100644 --- a/src/shared/utils/transaction/insert-transaction.ts +++ b/src/shared/utils/transaction/insert-transaction.ts @@ -8,7 +8,7 @@ import { } from "../../../shared/db/wallets/get-wallet-details"; import { doesChainSupportService } from "../../lib/chain/chain-capabilities"; import { createCustomError } from "../../../server/middleware/error"; -import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; +import { SendTransactionQueue } from "../../../worker/queues/send-transaction-queue"; import { getChecksumAddress } from "../primitive-types"; import { recordMetrics } from "../prometheus"; import { reportUsage } from "../usage"; diff --git a/src/shared/utils/transaction/queue-transation.ts b/src/shared/utils/transaction/queue-transation.ts index c19ddbc30..b84a44515 100644 --- a/src/shared/utils/transaction/queue-transation.ts +++ b/src/shared/utils/transaction/queue-transation.ts @@ -8,8 +8,8 @@ import { } from "thirdweb"; import { resolvePromisedValue } from "thirdweb/utils"; import { createCustomError } from "../../../server/middleware/error"; -import type { txOverridesWithValueSchema } from "../../../server/schemas/txOverrides"; -import { parseTransactionOverrides } from "../../../server/utils/transactionOverrides"; +import type { txOverridesWithValueSchema } from "../../../server/schemas/tx-overrides"; +import { parseTransactionOverrides } from "../../../server/utils/transaction-overrides"; import { prettifyError } from "../error"; import { insertTransaction } from "./insert-transaction"; import type { InsertedTransaction } from "./types"; diff --git a/src/shared/utils/transaction/webhook.ts b/src/shared/utils/transaction/webhook.ts index 159844a9d..305a94c9e 100644 --- a/src/shared/utils/transaction/webhook.ts +++ b/src/shared/utils/transaction/webhook.ts @@ -1,5 +1,5 @@ import { WebhooksEventTypes } from "../../schemas/webhooks"; -import { SendWebhookQueue } from "../../../worker/queues/sendWebhookQueue"; +import { SendWebhookQueue } from "../../../worker/queues/send-webhook-queue"; import type { AnyTransaction } from "./types"; export const enqueueTransactionWebhook = async ( diff --git a/src/shared/utils/usage.ts b/src/shared/utils/usage.ts index 97de003e3..957ac669a 100644 --- a/src/shared/utils/usage.ts +++ b/src/shared/utils/usage.ts @@ -2,9 +2,9 @@ import type { Static } from "@sinclair/typebox"; import type { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; import type { FastifyInstance } from "fastify"; import type { Address, Hex } from "thirdweb"; -import { ADMIN_QUEUES_BASEPATH } from "../../server/middleware/adminRoutes"; -import { OPENAPI_ROUTES } from "../../server/middleware/openApi"; -import type { contractParamSchema } from "../../server/schemas/sharedApiSchemas"; +import { ADMIN_QUEUES_BASEPATH } from "../../server/middleware/admin-routes"; +import { OPENAPI_ROUTES } from "../../server/middleware/open-api"; +import type { contractParamSchema } from "../../server/schemas/shared-api-schemas"; import type { walletWithAddressParamSchema } from "../../server/schemas/wallet"; import { getChainIdFromChain } from "../../server/utils/chain"; import { env } from "./env"; diff --git a/src/worker/index.ts b/src/worker/index.ts index cd9867a25..dce96767f 100644 --- a/src/worker/index.ts +++ b/src/worker/index.ts @@ -1,21 +1,21 @@ -import { chainIndexerListener } from "./listeners/chainIndexerListener"; +import { chainIndexerListener } from "./listeners/chain-indexer-listener"; import { newConfigurationListener, updatedConfigurationListener, -} from "./listeners/configListener"; +} from "./listeners/config-listener"; import { newWebhooksListener, updatedWebhooksListener, -} from "./listeners/webhookListener"; -import { initCancelRecycledNoncesWorker } from "./tasks/cancelRecycledNoncesWorker"; -import { initMineTransactionWorker } from "./tasks/mineTransactionWorker"; -import { initNonceHealthCheckWorker } from "./tasks/nonceHealthCheckWorker"; -import { initNonceResyncWorker } from "./tasks/nonceResyncWorker"; -import { initProcessEventLogsWorker } from "./tasks/processEventLogsWorker"; -import { initProcessTransactionReceiptsWorker } from "./tasks/processTransactionReceiptsWorker"; -import { initPruneTransactionsWorker } from "./tasks/pruneTransactionsWorker"; -import { initSendTransactionWorker } from "./tasks/sendTransactionWorker"; -import { initSendWebhookWorker } from "./tasks/sendWebhookWorker"; +} from "./listeners/webhook-listener"; +import { initCancelRecycledNoncesWorker } from "./tasks/cancel-recycled-nonces-worker"; +import { initMineTransactionWorker } from "./tasks/mine-transaction-worker"; +import { initNonceHealthCheckWorker } from "./tasks/nonce-health-check-worker"; +import { initNonceResyncWorker } from "./tasks/nonce-resync-worker"; +import { initProcessEventLogsWorker } from "./tasks/process-event-logs-worker"; +import { initProcessTransactionReceiptsWorker } from "./tasks/process-transaction-receipts-worker"; +import { initPruneTransactionsWorker } from "./tasks/prune-transactions-worker"; +import { initSendTransactionWorker } from "./tasks/send-transaction-worker"; +import { initSendWebhookWorker } from "./tasks/send-webhook-worker"; export const initWorker = async () => { initCancelRecycledNoncesWorker(); diff --git a/src/worker/indexers/chainIndexerRegistry.ts b/src/worker/indexers/chain-indexer-registry.ts similarity index 96% rename from src/worker/indexers/chainIndexerRegistry.ts rename to src/worker/indexers/chain-indexer-registry.ts index d8d540535..ed091e288 100644 --- a/src/worker/indexers/chainIndexerRegistry.ts +++ b/src/worker/indexers/chain-indexer-registry.ts @@ -1,7 +1,7 @@ import cron from "node-cron"; import { getBlockTimeSeconds } from "../../shared/utils/indexer/get-block-time"; import { logger } from "../../shared/utils/logger"; -import { handleContractSubscriptions } from "../tasks/chainIndexer"; +import { handleContractSubscriptions } from "../tasks/chain-indexer"; // @TODO: Move all worker logic to Bullmq to better handle multiple hosts. export const INDEXER_REGISTRY = {} as Record; diff --git a/src/worker/listeners/chainIndexerListener.ts b/src/worker/listeners/chain-indexer-listener.ts similarity index 92% rename from src/worker/listeners/chainIndexerListener.ts rename to src/worker/listeners/chain-indexer-listener.ts index a9f08a55f..f2c05e6e0 100644 --- a/src/worker/listeners/chainIndexerListener.ts +++ b/src/worker/listeners/chain-indexer-listener.ts @@ -1,7 +1,7 @@ import cron from "node-cron"; import { getConfig } from "../../shared/utils/cache/get-config"; import { logger } from "../../shared/utils/logger"; -import { manageChainIndexers } from "../tasks/manageChainIndexers"; +import { manageChainIndexers } from "../tasks/manage-chain-indexers"; let processChainIndexerStarted = false; let task: cron.ScheduledTask; diff --git a/src/worker/listeners/configListener.ts b/src/worker/listeners/config-listener.ts similarity index 97% rename from src/worker/listeners/configListener.ts rename to src/worker/listeners/config-listener.ts index fd4aa331d..a52483bad 100644 --- a/src/worker/listeners/configListener.ts +++ b/src/worker/listeners/config-listener.ts @@ -2,7 +2,7 @@ import { knex } from "../../shared/db/client"; import { getConfig } from "../../shared/utils/cache/get-config"; import { clearCacheCron } from "../../shared/utils/cron/clear-cache-cron"; import { logger } from "../../shared/utils/logger"; -import { chainIndexerListener } from "./chainIndexerListener"; +import { chainIndexerListener } from "./chain-indexer-listener"; export const newConfigurationListener = async (): Promise => { logger({ diff --git a/src/worker/listeners/webhookListener.ts b/src/worker/listeners/webhook-listener.ts similarity index 100% rename from src/worker/listeners/webhookListener.ts rename to src/worker/listeners/webhook-listener.ts diff --git a/src/worker/queues/cancelRecycledNoncesQueue.ts b/src/worker/queues/cancel-recycled-nonces-queue.ts similarity index 100% rename from src/worker/queues/cancelRecycledNoncesQueue.ts rename to src/worker/queues/cancel-recycled-nonces-queue.ts diff --git a/src/worker/queues/mineTransactionQueue.ts b/src/worker/queues/mine-transaction-queue.ts similarity index 100% rename from src/worker/queues/mineTransactionQueue.ts rename to src/worker/queues/mine-transaction-queue.ts diff --git a/src/worker/queues/nonceHealthCheckQueue.ts b/src/worker/queues/nonce-health-check-queue.ts similarity index 100% rename from src/worker/queues/nonceHealthCheckQueue.ts rename to src/worker/queues/nonce-health-check-queue.ts diff --git a/src/worker/queues/nonceResyncQueue.ts b/src/worker/queues/nonce-resync-queue.ts similarity index 100% rename from src/worker/queues/nonceResyncQueue.ts rename to src/worker/queues/nonce-resync-queue.ts diff --git a/src/worker/queues/processEventLogsQueue.ts b/src/worker/queues/process-event-logs-queue.ts similarity index 100% rename from src/worker/queues/processEventLogsQueue.ts rename to src/worker/queues/process-event-logs-queue.ts diff --git a/src/worker/queues/processTransactionReceiptsQueue.ts b/src/worker/queues/process-transaction-receipts-queue.ts similarity index 100% rename from src/worker/queues/processTransactionReceiptsQueue.ts rename to src/worker/queues/process-transaction-receipts-queue.ts diff --git a/src/worker/queues/pruneTransactionsQueue.ts b/src/worker/queues/prune-transactions-queue.ts similarity index 100% rename from src/worker/queues/pruneTransactionsQueue.ts rename to src/worker/queues/prune-transactions-queue.ts diff --git a/src/worker/queues/sendTransactionQueue.ts b/src/worker/queues/send-transaction-queue.ts similarity index 100% rename from src/worker/queues/sendTransactionQueue.ts rename to src/worker/queues/send-transaction-queue.ts diff --git a/src/worker/queues/sendWebhookQueue.ts b/src/worker/queues/send-webhook-queue.ts similarity index 100% rename from src/worker/queues/sendWebhookQueue.ts rename to src/worker/queues/send-webhook-queue.ts diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancel-recycled-nonces-worker.ts similarity index 97% rename from src/worker/tasks/cancelRecycledNoncesWorker.ts rename to src/worker/tasks/cancel-recycled-nonces-worker.ts index 0ac34b2a1..50a27cbc6 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancel-recycled-nonces-worker.ts @@ -5,7 +5,7 @@ import { isNonceAlreadyUsedError } from "../../shared/utils/error"; import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; import { sendCancellationTransaction } from "../../shared/utils/transaction/cancel-transaction"; -import { CancelRecycledNoncesQueue } from "../queues/cancelRecycledNoncesQueue"; +import { CancelRecycledNoncesQueue } from "../queues/cancel-recycled-nonces-queue"; import { logWorkerExceptions } from "../queues/queues"; // Must be explicitly called for the worker to run on this host. diff --git a/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chain-indexer.ts similarity index 97% rename from src/worker/tasks/chainIndexer.ts rename to src/worker/tasks/chain-indexer.ts index ee29f88d2..c318aa3ef 100644 --- a/src/worker/tasks/chainIndexer.ts +++ b/src/worker/tasks/chain-indexer.ts @@ -11,8 +11,8 @@ import { getContractSubscriptionsByChainId } from "../../shared/db/contract-subs import { getChain } from "../../shared/utils/chain"; import { logger } from "../../shared/utils/logger"; import { thirdwebClient } from "../../shared/utils/sdk"; -import { ProcessEventsLogQueue } from "../queues/processEventLogsQueue"; -import { ProcessTransactionReceiptsQueue } from "../queues/processTransactionReceiptsQueue"; +import { ProcessEventsLogQueue } from "../queues/process-event-logs-queue"; +import { ProcessTransactionReceiptsQueue } from "../queues/process-transaction-receipts-queue"; // A reasonable block range that is within RPC limits. // The minimum job time is 1 second, so this value should higher than the # blocks per second diff --git a/src/worker/tasks/manageChainIndexers.ts b/src/worker/tasks/manage-chain-indexers.ts similarity index 93% rename from src/worker/tasks/manageChainIndexers.ts rename to src/worker/tasks/manage-chain-indexers.ts index ef13d227f..84724e916 100644 --- a/src/worker/tasks/manageChainIndexers.ts +++ b/src/worker/tasks/manage-chain-indexers.ts @@ -3,7 +3,7 @@ import { INDEXER_REGISTRY, addChainIndexer, removeChainIndexer, -} from "../indexers/chainIndexerRegistry"; +} from "../indexers/chain-indexer-registry"; export const manageChainIndexers = async () => { const chainIdsToIndex = await getContractSubscriptionsUniqueChainIds(); diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mine-transaction-worker.ts similarity index 98% rename from src/worker/tasks/mineTransactionWorker.ts rename to src/worker/tasks/mine-transaction-worker.ts index 11440400c..9d3dd8d3c 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mine-transaction-worker.ts @@ -41,9 +41,9 @@ import { reportUsage } from "../../shared/utils/usage"; import { MineTransactionQueue, type MineTransactionData, -} from "../queues/mineTransactionQueue"; -import { SendTransactionQueue } from "../queues/sendTransactionQueue"; -import { SendWebhookQueue } from "../queues/sendWebhookQueue"; +} from "../queues/mine-transaction-queue"; +import { SendTransactionQueue } from "../queues/send-transaction-queue"; +import { SendWebhookQueue } from "../queues/send-webhook-queue"; /** * Check if the submitted transaction or userOp is mined onchain. diff --git a/src/worker/tasks/nonceHealthCheckWorker.ts b/src/worker/tasks/nonce-health-check-worker.ts similarity index 98% rename from src/worker/tasks/nonceHealthCheckWorker.ts rename to src/worker/tasks/nonce-health-check-worker.ts index 0032dec6c..839fb794b 100644 --- a/src/worker/tasks/nonceHealthCheckWorker.ts +++ b/src/worker/tasks/nonce-health-check-worker.ts @@ -7,7 +7,7 @@ import { import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; -import { NonceHealthCheckQueue } from "../queues/nonceHealthCheckQueue"; +import { NonceHealthCheckQueue } from "../queues/nonce-health-check-queue"; import { logWorkerExceptions } from "../queues/queues"; // Configuration diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonce-resync-worker.ts similarity index 97% rename from src/worker/tasks/nonceResyncWorker.ts rename to src/worker/tasks/nonce-resync-worker.ts index da4dffacc..d7ccfe553 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonce-resync-worker.ts @@ -12,7 +12,7 @@ import { prettifyError } from "../../shared/utils/error"; import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; import { thirdwebClient } from "../../shared/utils/sdk"; -import { NonceResyncQueue } from "../queues/nonceResyncQueue"; +import { NonceResyncQueue } from "../queues/nonce-resync-queue"; import { logWorkerExceptions } from "../queues/queues"; // Must be explicitly called for the worker to run on this host. diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/process-event-logs-worker.ts similarity index 98% rename from src/worker/tasks/processEventLogsWorker.ts rename to src/worker/tasks/process-event-logs-worker.ts index 3b56d9621..e4e43bfd2 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/process-event-logs-worker.ts @@ -26,9 +26,9 @@ import { thirdwebClient } from "../../shared/utils/sdk"; import { type EnqueueProcessEventLogsData, ProcessEventsLogQueue, -} from "../queues/processEventLogsQueue"; +} from "../queues/process-event-logs-queue"; import { logWorkerExceptions } from "../queues/queues"; -import { SendWebhookQueue } from "../queues/sendWebhookQueue"; +import { SendWebhookQueue } from "../queues/send-webhook-queue"; const handler: Processor = async (job: Job) => { const { diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/process-transaction-receipts-worker.ts similarity index 97% rename from src/worker/tasks/processTransactionReceiptsWorker.ts rename to src/worker/tasks/process-transaction-receipts-worker.ts index 620b316f2..8605cb257 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/process-transaction-receipts-worker.ts @@ -22,10 +22,10 @@ import { thirdwebClient } from "../../shared/utils/sdk"; import { ProcessTransactionReceiptsQueue, type EnqueueProcessTransactionReceiptsData, -} from "../queues/processTransactionReceiptsQueue"; +} from "../queues/process-transaction-receipts-queue"; import { logWorkerExceptions } from "../queues/queues"; -import { SendWebhookQueue } from "../queues/sendWebhookQueue"; -import { getWebhooksByContractAddresses } from "./processEventLogsWorker"; +import { SendWebhookQueue } from "../queues/send-webhook-queue"; +import { getWebhooksByContractAddresses } from "./process-event-logs-worker"; const handler: Processor = async (job: Job) => { const { diff --git a/src/worker/tasks/pruneTransactionsWorker.ts b/src/worker/tasks/prune-transactions-worker.ts similarity index 93% rename from src/worker/tasks/pruneTransactionsWorker.ts rename to src/worker/tasks/prune-transactions-worker.ts index 190622969..160f70e02 100644 --- a/src/worker/tasks/pruneTransactionsWorker.ts +++ b/src/worker/tasks/prune-transactions-worker.ts @@ -3,7 +3,7 @@ import { TransactionDB } from "../../shared/db/transactions/db"; 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"; +import { PruneTransactionsQueue } from "../queues/prune-transactions-queue"; import { logWorkerExceptions } from "../queues/queues"; const handler: Processor = async (job: Job) => { diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/send-transaction-worker.ts similarity index 99% rename from src/worker/tasks/sendTransactionWorker.ts rename to src/worker/tasks/send-transaction-worker.ts index 8c662f7e7..feee2b500 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/send-transaction-worker.ts @@ -52,12 +52,12 @@ import type { } from "../../shared/utils/transaction/types"; import { enqueueTransactionWebhook } from "../../shared/utils/transaction/webhook"; import { reportUsage } from "../../shared/utils/usage"; -import { MineTransactionQueue } from "../queues/mineTransactionQueue"; +import { MineTransactionQueue } from "../queues/mine-transaction-queue"; import { logWorkerExceptions } from "../queues/queues"; import { SendTransactionQueue, type SendTransactionData, -} from "../queues/sendTransactionQueue"; +} from "../queues/send-transaction-queue"; /** * Submit a transaction to RPC (EOA transactions) or bundler (userOps). diff --git a/src/worker/tasks/sendWebhookWorker.ts b/src/worker/tasks/send-webhook-worker.ts similarity index 96% rename from src/worker/tasks/sendWebhookWorker.ts rename to src/worker/tasks/send-webhook-worker.ts index bd62edc40..b2bcf5147 100644 --- a/src/worker/tasks/sendWebhookWorker.ts +++ b/src/worker/tasks/send-webhook-worker.ts @@ -6,19 +6,19 @@ import { WebhooksEventTypes, type BackendWalletBalanceWebhookParams, } from "../../shared/schemas/webhooks"; -import { toEventLogSchema } from "../../server/schemas/eventLog"; +import { toEventLogSchema } from "../../server/schemas/event-log"; import { toTransactionSchema, type TransactionSchema, } from "../../server/schemas/transaction"; -import { toTransactionReceiptSchema } from "../../server/schemas/transactionReceipt"; +import { toTransactionReceiptSchema } from "../../server/schemas/transaction-receipt"; import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; import { sendWebhookRequest, type WebhookResponse, } from "../../shared/utils/webhook"; -import { SendWebhookQueue, type WebhookJob } from "../queues/sendWebhookQueue"; +import { SendWebhookQueue, type WebhookJob } from "../queues/send-webhook-queue"; const handler: Processor = async (job: Job) => { const { data, webhook } = superjson.parse(job.data); diff --git a/tests/unit/aws-arn.test.ts b/tests/unit/aws-arn.test.ts index 8b46025f3..90bafed78 100644 --- a/tests/unit/aws-arn.test.ts +++ b/tests/unit/aws-arn.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { getAwsKmsArn, splitAwsKmsArn, -} from "../../src/server/utils/wallets/awsKmsArn"; +} from "../../src/server/utils/wallets/aws-kms-arn"; describe("splitAwsKmsArn", () => { it("should correctly split a valid AWS KMS ARN", () => { diff --git a/tests/unit/aws-kms.test.ts b/tests/unit/aws-kms.test.ts index b02c4e28a..d4d95322b 100644 --- a/tests/unit/aws-kms.test.ts +++ b/tests/unit/aws-kms.test.ts @@ -11,7 +11,7 @@ import { import { toUnits, toWei } from "thirdweb/utils"; import { getWalletBalance } from "thirdweb/wallets"; import { TEST_CLIENT } from "../shared/client.ts"; -import { getAwsKmsAccount } from "../../src/server/utils/wallets/getAwsKmsAccount"; +import { getAwsKmsAccount } from "../../src/server/utils/wallets/get-aws-kms-account"; import { TEST_AWS_KMS_CONFIG } from "../shared/aws-kms.ts"; let account: Awaited>; diff --git a/tests/unit/gcp-kms.test.ts b/tests/unit/gcp-kms.test.ts index 1f2d183cc..fbb71bff8 100644 --- a/tests/unit/gcp-kms.test.ts +++ b/tests/unit/gcp-kms.test.ts @@ -10,7 +10,7 @@ import { } from "thirdweb/transaction"; import { toUnits, toWei } from "thirdweb/utils"; import { getWalletBalance } from "thirdweb/wallets"; -import { getGcpKmsAccount } from "../../src/server/utils/wallets/getGcpKmsAccount"; +import { getGcpKmsAccount } from "../../src/server/utils/wallets/get-gcp-kms-account"; import { TEST_GCP_KMS_CONFIG } from "../shared/gcp-kms"; import { TEST_CLIENT } from "../shared/client"; diff --git a/tests/unit/gcp-resource-path.test.ts b/tests/unit/gcp-resource-path.test.ts index 52a497d2a..c7097868c 100644 --- a/tests/unit/gcp-resource-path.test.ts +++ b/tests/unit/gcp-resource-path.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { getGcpKmsResourcePath, splitGcpKmsResourcePath, -} from "../../src/server/utils/wallets/gcpKmsResourcePath"; +} from "../../src/server/utils/wallets/gcp-kms-resource-path"; describe("splitGcpKmsResourcePath", () => { it("should correctly split a valid GCP KMS resource path", () => { From f6959c3b852d67013fd4c71ef7ae7005fdb31c9a Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 17:14:59 +0800 Subject: [PATCH 37/44] chore(refactor): kebab-case /server folder (#805) * chore(refactor): kebab-case /shared/db * all shared folder * chore(refactor): Rename /worker folder to kebab-case * chore(refactor): kebab-case /server folder * remove renamer * remove renamer --- renamer.ts | 145 ----------------------------------------------------- 1 file changed, 145 deletions(-) delete mode 100644 renamer.ts diff --git a/renamer.ts b/renamer.ts deleted file mode 100644 index 97c3206e3..000000000 --- a/renamer.ts +++ /dev/null @@ -1,145 +0,0 @@ -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/server"); // Change as needed -processFilesAndFolders(projectRoot); From 04fdca0e4f8082c8a8f5ad05bc21ef24e6f05c29 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 19:02:33 +0800 Subject: [PATCH 38/44] chore: Lint on build (#806) * chore: Biome linter fixes * chore: Add lint on build --- .eslintrc.json | 18 - ...asedImageBuild.yml => build-image-tag.yml} | 0 .../workflows/{check-build.yml => build.yml} | 2 +- .github/workflows/lint.yml | 24 + .../{npmPublish.yml => npm-publish.yml} | 0 .gitignore | 3 - package.json | 11 +- src/server/routes/admin/nonces.ts | 8 +- .../erc721/write/set-claim-conditions.ts | 4 +- .../erc721/write/update-claim-conditions.ts | 5 +- src/shared/db/relayer/get-relayer-by-id.ts | 2 +- src/shared/db/wallets/nonce-map.ts | 4 +- src/shared/utils/cron/is-valid-cron.ts | 4 +- src/worker/queues/process-event-logs-queue.ts | 2 +- .../process-transaction-receipts-queue.ts | 2 +- .../tasks/cancel-recycled-nonces-worker.ts | 4 +- tests/e2e/.gitignore | 3 - yarn.lock | 522 +----------------- 18 files changed, 64 insertions(+), 554 deletions(-) delete mode 100644 .eslintrc.json rename .github/workflows/{tagBasedImageBuild.yml => build-image-tag.yml} (100%) rename .github/workflows/{check-build.yml => build.yml} (95%) create mode 100644 .github/workflows/lint.yml rename .github/workflows/{npmPublish.yml => npm-publish.yml} (100%) diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 621ab0184..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], - "rules": { - "no-console": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { "argsIgnorePattern": "^_" } - ] - } -} diff --git a/.github/workflows/tagBasedImageBuild.yml b/.github/workflows/build-image-tag.yml similarity index 100% rename from .github/workflows/tagBasedImageBuild.yml rename to .github/workflows/build-image-tag.yml diff --git a/.github/workflows/check-build.yml b/.github/workflows/build.yml similarity index 95% rename from .github/workflows/check-build.yml rename to .github/workflows/build.yml index 5ec279496..6281f2bcc 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Check Build +name: Build on: pull_request diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..f08a3b590 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,24 @@ +name: Lint + +on: pull_request + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.ref }} + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "yarn" + + - name: Install dependencies + run: yarn install + + - name: Run lint + run: yarn lint \ No newline at end of file diff --git a/.github/workflows/npmPublish.yml b/.github/workflows/npm-publish.yml similarity index 100% rename from .github/workflows/npmPublish.yml rename to .github/workflows/npm-publish.yml diff --git a/.gitignore b/.gitignore index dbb062fa7..5e4780803 100644 --- a/.gitignore +++ b/.gitignore @@ -54,9 +54,6 @@ web_modules/ # Optional npm cache directory .npm -# Optional eslint cache -.eslintcache - # Optional stylelint cache .stylelintcache diff --git a/package.json b/package.json index 371ab1621..8ef90a411 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ "start:run": "node --experimental-specifier-resolution=node ./dist/index.js", "start:docker": "docker compose --profile engine --env-file ./.env up --remove-orphans", "start:docker-force-build": "docker compose --profile engine --env-file ./.env up --remove-orphans --build", - "lint:fix": "eslint --fix 'src/**/*.ts'", "test:unit": "vitest", "test:coverage": "vitest run --coverage", + "lint": "yarn biome lint", "copy-files": "cp -r ./src/prisma ./dist/" }, "dependencies": { @@ -82,21 +82,12 @@ "@types/pg": "^8.6.6", "@types/uuid": "^9.0.1", "@types/ws": "^8.5.5", - "@typescript-eslint/eslint-plugin": "^5.55.0", - "@typescript-eslint/parser": "^5.55.0", "@vitest/coverage-v8": "^2.0.3", - "eslint": "^9.3.0", - "eslint-config-prettier": "^8.7.0", "openapi-typescript-codegen": "^0.25.0", - "prettier": "^2.8.7", "prool": "^0.0.16", "typescript": "^5.1.3", "vitest": "^2.0.3" }, - "lint-staged": { - "*.{js,ts}": "eslint --cache --fix", - "*.{js,ts,md}": "prettier --write" - }, "prisma": { "schema": "./src/prisma/schema.prisma" }, diff --git a/src/server/routes/admin/nonces.ts b/src/server/routes/admin/nonces.ts index 5408dc403..d09e6493a 100644 --- a/src/server/routes/admin/nonces.ts +++ b/src/server/routes/admin/nonces.ts @@ -91,7 +91,7 @@ export async function getNonceDetailsRoute(fastify: FastifyInstance) { const { walletAddress, chain } = request.query; const result = await getNonceDetails({ walletAddress: walletAddress ? getAddress(walletAddress) : undefined, - chainId: chain ? parseInt(chain) : undefined, + chainId: chain ? Number.parseInt(chain) : undefined, }); reply.status(StatusCodes.OK).send({ @@ -144,12 +144,12 @@ export const getNonceDetails = async ({ walletAddress: key.walletAddress, chainId: key.chainId, onchainNonce: onchainNonces[index], - lastUsedNonce: parseInt(lastUsedNonceResult[1] as string) ?? 0, + lastUsedNonce: Number.parseInt(lastUsedNonceResult[1] as string) ?? 0, sentNonces: (sentNoncesResult[1] as string[]) - .map((nonce) => parseInt(nonce)) + .map((nonce) => Number.parseInt(nonce)) .sort((a, b) => b - a), recycledNonces: (recycledNoncesResult[1] as string[]) - .map((nonce) => parseInt(nonce)) + .map((nonce) => Number.parseInt(nonce)) .sort((a, b) => b - a), }; }); diff --git a/src/server/routes/contract/extensions/erc721/write/set-claim-conditions.ts b/src/server/routes/contract/extensions/erc721/write/set-claim-conditions.ts index 4060fe9e7..21373150b 100644 --- a/src/server/routes/contract/extensions/erc721/write/set-claim-conditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/set-claim-conditions.ts @@ -78,8 +78,8 @@ export async function erc721SetClaimConditions(fastify: FastifyInstance) { return { ...item, startTime: item.startTime - ? isUnixEpochTimestamp(parseInt(item.startTime.toString())) - ? new Date(parseInt(item.startTime.toString()) * 1000) + ? isUnixEpochTimestamp(Number.parseInt(item.startTime.toString())) + ? new Date(Number.parseInt(item.startTime.toString()) * 1000) : new Date(item.startTime) : undefined, }; diff --git a/src/server/routes/contract/extensions/erc721/write/update-claim-conditions.ts b/src/server/routes/contract/extensions/erc721/write/update-claim-conditions.ts index 311d3d839..1b8112059 100644 --- a/src/server/routes/contract/extensions/erc721/write/update-claim-conditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/update-claim-conditions.ts @@ -80,10 +80,11 @@ export async function erc721UpdateClaimConditions(fastify: FastifyInstance) { ...claimConditionInput, startTime: claimConditionInput.startTime ? isUnixEpochTimestamp( - parseInt(claimConditionInput.startTime.toString()), + Number.parseInt(claimConditionInput.startTime.toString()), ) ? new Date( - parseInt(claimConditionInput.startTime.toString()) * 1000, + Number.parseInt(claimConditionInput.startTime.toString()) * + 1000, ) : new Date(claimConditionInput.startTime) : undefined, diff --git a/src/shared/db/relayer/get-relayer-by-id.ts b/src/shared/db/relayer/get-relayer-by-id.ts index 315132b5a..9216e5c5f 100644 --- a/src/shared/db/relayer/get-relayer-by-id.ts +++ b/src/shared/db/relayer/get-relayer-by-id.ts @@ -17,7 +17,7 @@ export const getRelayerById = async ({ id }: GetRelayerByIdParams) => { return { ...relayer, - chainId: parseInt(relayer.chainId), + chainId: Number.parseInt(relayer.chainId), allowedContracts: relayer.allowedContracts ? (JSON.parse(relayer.allowedContracts).map((contractAddress: string) => contractAddress.toLowerCase(), diff --git a/src/shared/db/wallets/nonce-map.ts b/src/shared/db/wallets/nonce-map.ts index 5c8bab836..587a0529b 100644 --- a/src/shared/db/wallets/nonce-map.ts +++ b/src/shared/db/wallets/nonce-map.ts @@ -53,7 +53,7 @@ export const getNonceMap = async (args: { for (let i = 0; i < elementsWithScores.length; i += 2) { result.push({ queueId: elementsWithScores[i], - nonce: parseInt(elementsWithScores[i + 1]), + nonce: Number.parseInt(elementsWithScores[i + 1]), }); } return result; @@ -73,7 +73,7 @@ export const pruneNonceMaps = async () => { let numDeleted = 0; for (const [error, result] of results) { if (!error) { - numDeleted += parseInt(result as string); + numDeleted += Number.parseInt(result as string); } } return numDeleted; diff --git a/src/shared/utils/cron/is-valid-cron.ts b/src/shared/utils/cron/is-valid-cron.ts index abfdc5715..67ed4b462 100644 --- a/src/shared/utils/cron/is-valid-cron.ts +++ b/src/shared/utils/cron/is-valid-cron.ts @@ -28,7 +28,7 @@ export const isValidCron = (input: string): boolean => { let parsedSecondsValue: number | null = null; if (seconds.startsWith("*/")) { - parsedSecondsValue = parseInt(seconds.split("/")[1]); + parsedSecondsValue = Number.parseInt(seconds.split("/")[1]); } // Check for specific invalid patterns in seconds field @@ -66,7 +66,7 @@ const checkCronFieldInterval = ( fieldName: string, ) => { if (field.startsWith("*/")) { - const parsedValue = parseInt(field.split("/")[1]); + const parsedValue = Number.parseInt(field.split("/")[1]); if (parsedValue < minValue || parsedValue > maxValue) { throw createCustomError( `Invalid cron expression. ${fieldName} must be between ${minValue} and ${maxValue} when using an interval.`, diff --git a/src/worker/queues/process-event-logs-queue.ts b/src/worker/queues/process-event-logs-queue.ts index 499a73940..2b9373717 100644 --- a/src/worker/queues/process-event-logs-queue.ts +++ b/src/worker/queues/process-event-logs-queue.ts @@ -36,7 +36,7 @@ export class ProcessEventsLogQueue { // This backoff attempts at intervals: // 30s, 1m, 2m, 4m, 8m, 16m, 32m, ~1h, ~2h, ~4h for (let i = 0; i < requeryDelays.length; i++) { - const delay = parseInt(requeryDelays[i]) * 1000; + const delay = Number.parseInt(requeryDelays[i]) * 1000; const attempts = i === requeryDelays.length - 1 ? 10 : 0; await this.q.add(jobName, serialized, { delay, diff --git a/src/worker/queues/process-transaction-receipts-queue.ts b/src/worker/queues/process-transaction-receipts-queue.ts index 946e1eb1a..5ddb124e1 100644 --- a/src/worker/queues/process-transaction-receipts-queue.ts +++ b/src/worker/queues/process-transaction-receipts-queue.ts @@ -36,7 +36,7 @@ export class ProcessTransactionReceiptsQueue { // This backoff attempts at intervals: // 30s, 1m, 2m, 4m, 8m, 16m, 32m, ~1h, ~2h, ~4h for (let i = 0; i < requeryDelays.length; i++) { - const delay = parseInt(requeryDelays[i]) * 1000; + const delay = Number.parseInt(requeryDelays[i]) * 1000; const attempts = i === requeryDelays.length - 1 ? 10 : 0; await this.q.add(jobName, serialized, { delay, diff --git a/src/worker/tasks/cancel-recycled-nonces-worker.ts b/src/worker/tasks/cancel-recycled-nonces-worker.ts index 50a27cbc6..9a445c608 100644 --- a/src/worker/tasks/cancel-recycled-nonces-worker.ts +++ b/src/worker/tasks/cancel-recycled-nonces-worker.ts @@ -68,7 +68,7 @@ const handler: Processor = async (job: Job) => { const fromRecycledNoncesKey = (key: string) => { const [_, chainId, walletAddress] = key.split(":"); return { - chainId: parseInt(chainId), + chainId: Number.parseInt(chainId), walletAddress: walletAddress as Address, }; }; @@ -89,5 +89,5 @@ const getAndDeleteRecycledNonces = async (key: string) => { throw new Error(`Error getting members of ${key}: ${error}`); } // No need to sort here as ZRANGE returns elements in ascending order - return (nonces as string[]).map((v) => parseInt(v)); + return (nonces as string[]).map((v) => Number.parseInt(v)); }; diff --git a/tests/e2e/.gitignore b/tests/e2e/.gitignore index b4dab3018..7cf2c6b39 100644 --- a/tests/e2e/.gitignore +++ b/tests/e2e/.gitignore @@ -71,9 +71,6 @@ web_modules/ .npm -# Optional eslint cache - -.eslintcache # Optional stylelint cache diff --git a/yarn.lock b/yarn.lock index 569cc4fcc..e716a4125 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1498,38 +1498,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== - -"@eslint/eslintrc@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" - integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^10.0.1" - globals "^14.0.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@9.3.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.3.0.tgz#2e8f65c9c55227abc4845b1513c69c32c679d8fe" - integrity sha512-niBqk8iwv96+yuTwjM6bWg8ovzAPF9qkICsGtcoa5/dmqcEMfdwNAX7+/OHcJHc7wj7XqPxH98oAHytFYlw6Sw== - "@eth-optimism/contracts-bedrock@0.17.2": version "0.17.2" resolved "https://registry.yarnpkg.com/@eth-optimism/contracts-bedrock/-/contracts-bedrock-0.17.2.tgz#501ae26c7fe4ef4edf6420c384f76677e85f62ae" @@ -2491,30 +2459,6 @@ protobufjs "^7.2.5" yargs "^17.7.2" -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== - dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - -"@humanwhocodes/retry@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" - integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== - "@ioredis/commands@^1.1.1": version "1.2.0" resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11" @@ -2936,27 +2880,6 @@ resolved "https://registry.yarnpkg.com/@node-lightning/checksum/-/checksum-0.27.4.tgz#493004e76aa76cdbab46f01bf445e4010c30a179" integrity sha512-33DuXWqVVvHPnO7O38L2wtz9cSjCXeqi3+xUHZpPhZHpez4atw0JUcc1Fa1SJ4aEjDX81t6rLloMW083z9ZHYQ== -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - "@opentelemetry/api@>=1.0.0 <1.9.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.8.0.tgz#5aa7abb48f23f693068ed2999ae627d2f7d902ec" @@ -4978,7 +4901,7 @@ "@types/minimatch" "^5.1.2" "@types/node" "*" -"@types/json-schema@^7.0.6", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.6": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -5093,11 +5016,6 @@ dependencies: "@types/node" "*" -"@types/semver@^7.3.12": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/tough-cookie@*": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" @@ -5125,90 +5043,6 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.55.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" - integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== - dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/type-utils" "5.62.0" - "@typescript-eslint/utils" "5.62.0" - debug "^4.3.4" - graphemer "^1.4.0" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/parser@^5.55.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" - integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== - dependencies: - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - debug "^4.3.4" - -"@typescript-eslint/scope-manager@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" - integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== - dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" - -"@typescript-eslint/type-utils@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" - integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== - dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" - debug "^4.3.4" - tsutils "^3.21.0" - -"@typescript-eslint/types@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" - integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== - -"@typescript-eslint/typescript-estree@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" - integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== - dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/utils@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" - integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" - integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== - dependencies: - "@typescript-eslint/types" "5.62.0" - eslint-visitor-keys "^3.3.0" - "@vitest/coverage-v8@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-2.0.3.tgz#a3c69ac301e4aebc0a28a3ad27a89cedce2f760e" @@ -5892,16 +5726,6 @@ ajv-formats@^3.0.1: dependencies: ajv "^8.0.0" -ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - ajv@^8.0.0, ajv@^8.10.0, ajv@^8.11.0: version "8.14.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.14.0.tgz#f514ddfd4756abb200e1704414963620a625ebbb" @@ -5961,11 +5785,6 @@ aria-hidden@^1.1.1: dependencies: tslib "^2.0.0" -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - arrify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" @@ -6800,7 +6619,7 @@ cross-fetch@^4.0.0: dependencies: node-fetch "^2.6.12" -cross-spawn@>=7.0.6, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@>=7.0.6, cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -6907,7 +6726,7 @@ debug@2.6.9, debug@^2.2.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5: +debug@4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@^4.3.5: version "4.3.5" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== @@ -6943,7 +6762,7 @@ deep-eql@^5.0.1: resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-5.0.2.tgz#4b756d8d770a9257300825d52a2c2cff99c3a341" integrity sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q== -deep-is@^0.1.3, deep-is@~0.1.3: +deep-is@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== @@ -7043,13 +6862,6 @@ dijkstrajs@^1.0.1: resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz#4c8dbdea1f0f6478bff94d9c49c784d623e4fc23" integrity sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA== -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -7275,77 +7087,11 @@ escodegen@^1.13.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^8.7.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" - integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.1.tgz#a9601e4b81a0b9171657c343fb13111688963cfc" - integrity sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: +eslint-visitor-keys@^3.4.1: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint-visitor-keys@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" - integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== - -eslint@^9.3.0: - version "9.3.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.3.0.tgz#36a96db84592618d6ed9074d677e92f4e58c08b9" - integrity sha512-5Iv4CsZW030lpUqHBapdPo3MJetAPtejVW8B84GIcIIv8+ohFaddXsrn1Gn8uD9ijDb+kcYKFUVmC8qG8B2ORQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^3.1.0" - "@eslint/js" "9.3.0" - "@humanwhocodes/config-array" "^0.13.0" - "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.3.0" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - escape-string-regexp "^4.0.0" - eslint-scope "^8.0.1" - eslint-visitor-keys "^4.0.0" - espree "^10.0.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^8.0.0" - find-up "^5.0.0" - glob-parent "^6.0.2" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - esm@^3.2.25: version "3.2.25" resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" @@ -7361,15 +7107,6 @@ esniff@^2.0.1: event-emitter "^0.3.5" type "^2.7.2" -espree@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f" - integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww== - dependencies: - acorn "^8.11.3" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^4.0.0" - espree@^9.0.0: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -7384,26 +7121,12 @@ esprima@^4.0.1: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.1.0, estraverse@^5.2.0: +estraverse@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -7767,27 +7490,11 @@ fast-decode-uri-component@^1.0.1: resolved "https://registry.yarnpkg.com/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz#46f8b6c22b30ff7a81357d4f59abfae938202543" integrity sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg== -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: +fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.9: - version "3.3.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" - integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - fast-json-stringify@^5.7.0, fast-json-stringify@^5.8.0: version "5.16.0" resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-5.16.0.tgz#e35baa9f85a61f81680b2845969f91bd02d1b30e" @@ -7801,7 +7508,7 @@ fast-json-stringify@^5.7.0, fast-json-stringify@^5.8.0: json-schema-ref-resolver "^1.0.1" rfdc "^1.2.0" -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: +fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== @@ -7874,7 +7581,7 @@ fastify@^4.28.1: semver "^7.5.4" toad-cache "^3.3.0" -fastq@^1.17.1, fastq@^1.6.0: +fastq@^1.17.1: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== @@ -7893,13 +7600,6 @@ figures@^6.1.0: dependencies: is-unicode-supported "^2.0.0" -file-entry-cache@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" - integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== - dependencies: - flat-cache "^4.0.0" - filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -7941,27 +7641,6 @@ find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" - integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.4" - -flatted@^3.2.9: - version "3.3.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - fn.name@1.x.x: version "1.1.0" resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" @@ -8140,20 +7819,13 @@ getopts@2.3.0: resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.3.0.tgz#71e5593284807e03e2427449d4f6712a268666f4" integrity sha512-5eDf9fuSXwxBL6q5HX+dhDj+dslFGWzU5thZ9kNKUkcPtaPdatmUFKwHFrLb/uf/WpA4BHET+AX3Scl56cAjpA== -glob-parent@^5.1.2, glob-parent@~5.1.2: +glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - glob@^10.3.7, glob@^10.4.1: version "10.4.5" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" @@ -8182,23 +7854,6 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^14.0.0: - version "14.0.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" - integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== - -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - google-auth-library@^8.0.2: version "8.9.0" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-8.9.0.tgz#15a271eb2ec35d43b81deb72211bd61b1ef14dd0" @@ -8284,11 +7939,6 @@ graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - gtoken@^6.1.0: version "6.1.2" resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-6.1.2.tgz#aeb7bdb019ff4c3ba3ac100bbe7b6e74dce0e8bc" @@ -8528,7 +8178,7 @@ ieee754@^1.1.4, ieee754@^1.1.8, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^5.2.0, ignore@^5.2.4: +ignore@^5.2.4: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== @@ -8556,11 +8206,6 @@ import-in-the-middle@1.11.2: cjs-module-lexer "^1.2.2" module-details-from-path "^1.0.3" -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -8690,7 +8335,7 @@ is-generator-function@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: +is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -8714,11 +8359,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - is-plain-obj@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" @@ -8947,11 +8587,6 @@ json-bigint@^1.0.0: dependencies: bignumber.js "^9.0.0" -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -8993,21 +8628,11 @@ json-schema-resolver@^2.0.0: rfdc "^1.1.4" uri-js "^4.2.2" -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - json-schema-traverse@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -9086,13 +8711,6 @@ key-encoder@2.0.3: bn.js "^4.11.8" elliptic "^6.4.1" -keyv@^4.5.4: - version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - keyvaluestorage-interface@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz#13ebdf71f5284ad54be94bd1ad9ed79adad515ff" @@ -9135,14 +8753,6 @@ kuler@^2.0.0: resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -9247,13 +8857,6 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -9304,11 +8907,6 @@ lodash.isstring@^4.0.1: resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" @@ -9463,11 +9061,6 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - merkletreejs@^0.3.11: version "0.3.11" resolved "https://registry.yarnpkg.com/merkletreejs/-/merkletreejs-0.3.11.tgz#e0de05c3ca1fd368de05a12cb8efb954ef6fc04f" @@ -9484,7 +9077,7 @@ micro-ftch@^0.3.1: resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== -micromatch@>=4.0.8, micromatch@^4.0.4, micromatch@^4.0.5: +micromatch@>=4.0.8, micromatch@^4.0.5: version "4.0.8" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== @@ -9532,7 +9125,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@^3.0.5, minimatch@^3.1.2: +minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -9710,16 +9303,6 @@ napi-wasm@^1.1.0: resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -9970,18 +9553,6 @@ optionator@^0.8.1: type-check "~0.3.2" word-wrap "~1.2.3" -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.5" - os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" @@ -10020,7 +9591,7 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2, p-limit@^3.1.0: +p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -10034,13 +9605,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -10420,21 +9984,11 @@ preact@^10.24.2: resolved "https://registry.yarnpkg.com/preact/-/preact-10.25.0.tgz#22a1c93ce97336c5d01d74f363433ab0cd5cde64" integrity sha512-6bYnzlLxXV3OSpUxLdaxBmE7PMOu0aR3pG6lryK/0jmvcDFPlcXGQAt5DpK3RITWiDrfYZRI0druyaK/S9kYLg== -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== -prettier@^2.8.7: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== - pretty-ms@^9.0.0: version "9.2.0" resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-9.2.0.tgz#e14c0aad6493b69ed63114442a84133d7e560ef0" @@ -10654,11 +10208,6 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - quick-format-unescaped@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" @@ -10956,13 +10505,6 @@ rollup@^4.20.0: "@rollup/rollup-win32-x64-msvc" "4.27.4" fsevents "~2.3.2" -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -11024,7 +10566,7 @@ secure-json-parse@^2.7.0: resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== -semver@^7.1.2, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: +semver@^7.1.2, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -11113,11 +10655,6 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - solady@0.0.180: version "0.0.180" resolved "https://registry.yarnpkg.com/solady/-/solady-0.0.180.tgz#d806c84a0bf8b6e3d85a8fb0978980de086ff59e" @@ -11319,7 +10856,7 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -11431,11 +10968,6 @@ text-hex@1.0.x: resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - thirdweb@5.26.0: version "5.26.0" resolved "https://registry.yarnpkg.com/thirdweb/-/thirdweb-5.26.0.tgz#00651fadb431e3423ffc3151b1ce079e0ca3cc1d" @@ -11598,7 +11130,7 @@ triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== -tslib@1.14.1, tslib@^1.8.1: +tslib@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -11618,13 +11150,6 @@ tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -11640,13 +11165,6 @@ tweetnacl@^1.0.3: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -12304,7 +11822,7 @@ winston@^3.14.1: triple-beam "^1.3.0" winston-transport "^4.7.0" -word-wrap@^1.2.5, word-wrap@~1.2.3: +word-wrap@~1.2.3: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== From 71fb8b06db6d196dcebca8c8a984b9111415f381 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 19:45:05 +0800 Subject: [PATCH 39/44] fix: Reset nonce if out of funds (#807) * fix: Reset nonce if out of funds * rename test files too --- src/shared/utils/error.ts | 10 +++------ .../tasks/cancel-recycled-nonces-worker.ts | 22 +++++++++++++++---- ...gnMessage.test.ts => sign-message.test.ts} | 0 ...pare.test.ts => signature-prepare.test.ts} | 0 ...ockTime.test.ts => get-block-time.test.ts} | 0 ...est.ts => send-transaction-worker.test.ts} | 0 6 files changed, 21 insertions(+), 11 deletions(-) rename tests/e2e/tests/routes/{signMessage.test.ts => sign-message.test.ts} (100%) rename tests/e2e/tests/routes/{signaturePrepare.test.ts => signature-prepare.test.ts} (100%) rename tests/e2e/tests/utils/{getBlockTime.test.ts => get-block-time.test.ts} (100%) rename tests/unit/{sendTransactionWorker.test.ts => send-transaction-worker.test.ts} (100%) diff --git a/src/shared/utils/error.ts b/src/shared/utils/error.ts index c7b619c7a..51d4f8f47 100644 --- a/src/shared/utils/error.ts +++ b/src/shared/utils/error.ts @@ -16,11 +16,10 @@ const _parseMessage = (error: unknown): string | null => { export const isNonceAlreadyUsedError = (error: unknown) => { const message = _parseMessage(error); - const errorPhrases = ["nonce too low", "already known"]; if (message) { - return errorPhrases.some((phrase) => - message.toLowerCase().includes(phrase), + return ( + message.includes("nonce too low") || message.includes("already known") ); } @@ -41,10 +40,7 @@ export const isReplacementGasFeeTooLow = (error: unknown) => { export const isInsufficientFundsError = (error: unknown) => { const message = _parseMessage(error); if (message) { - return ( - message.includes("insufficient funds for gas * price + value") || - message.includes("insufficient funds for intrinsic transaction cost") - ); + return message.includes("insufficient funds"); } return isEthersErrorCode(error, ethers.errors.INSUFFICIENT_FUNDS); }; diff --git a/src/worker/tasks/cancel-recycled-nonces-worker.ts b/src/worker/tasks/cancel-recycled-nonces-worker.ts index 9a445c608..0757cdb9f 100644 --- a/src/worker/tasks/cancel-recycled-nonces-worker.ts +++ b/src/worker/tasks/cancel-recycled-nonces-worker.ts @@ -1,7 +1,13 @@ import { type Job, type Processor, Worker } from "bullmq"; import type { Address } from "thirdweb"; -import { recycleNonce } from "../../shared/db/wallets/wallet-nonce"; -import { isNonceAlreadyUsedError } from "../../shared/utils/error"; +import { + deleteNoncesForBackendWallets, + recycleNonce, +} from "../../shared/db/wallets/wallet-nonce"; +import { + isInsufficientFundsError, + isNonceAlreadyUsedError, +} from "../../shared/utils/error"; import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; import { sendCancellationTransaction } from "../../shared/utils/transaction/cancel-transaction"; @@ -47,10 +53,18 @@ const handler: Processor = async (job: Job) => { }); success.push(nonce); } catch (error: unknown) { - // Release the nonce if it has not expired. - if (isNonceAlreadyUsedError(error)) { + if (isInsufficientFundsError(error)) { + // Wallet is out of funds. Reset the nonce state. + // After funded, the next transaction will resync the nonce. + job.log( + `Wallet ${chainId}:${walletAddress} out of funds. Resetting nonce.`, + ); + await deleteNoncesForBackendWallets([{ chainId, walletAddress }]); + } else if (isNonceAlreadyUsedError(error)) { + // Nonce is used. Don't recycle it. ignore.push(nonce); } else { + // Nonce is not used onchain. Recycle it. job.log(`Recycling nonce: ${nonce}`); await recycleNonce(chainId, walletAddress, nonce); fail.push(nonce); diff --git a/tests/e2e/tests/routes/signMessage.test.ts b/tests/e2e/tests/routes/sign-message.test.ts similarity index 100% rename from tests/e2e/tests/routes/signMessage.test.ts rename to tests/e2e/tests/routes/sign-message.test.ts diff --git a/tests/e2e/tests/routes/signaturePrepare.test.ts b/tests/e2e/tests/routes/signature-prepare.test.ts similarity index 100% rename from tests/e2e/tests/routes/signaturePrepare.test.ts rename to tests/e2e/tests/routes/signature-prepare.test.ts diff --git a/tests/e2e/tests/utils/getBlockTime.test.ts b/tests/e2e/tests/utils/get-block-time.test.ts similarity index 100% rename from tests/e2e/tests/utils/getBlockTime.test.ts rename to tests/e2e/tests/utils/get-block-time.test.ts diff --git a/tests/unit/sendTransactionWorker.test.ts b/tests/unit/send-transaction-worker.test.ts similarity index 100% rename from tests/unit/sendTransactionWorker.test.ts rename to tests/unit/send-transaction-worker.test.ts From b2a0b1a9e4c369ce787f756f17f4f2dd06dec7a9 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Wed, 11 Dec 2024 10:51:46 +0800 Subject: [PATCH 40/44] fix: add fallback resend timer if block is stuck (#809) --- src/worker/tasks/mine-transaction-worker.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/worker/tasks/mine-transaction-worker.ts b/src/worker/tasks/mine-transaction-worker.ts index 9d3dd8d3c..e0c649f1c 100644 --- a/src/worker/tasks/mine-transaction-worker.ts +++ b/src/worker/tasks/mine-transaction-worker.ts @@ -165,18 +165,21 @@ const _mineTransaction = async ( } // Else the transaction is not mined yet. - const ellapsedMs = Date.now() - sentTransaction.queuedAt.getTime(); + const elapsedSeconds = msSince(sentTransaction.sentAt) / 1000; job.log( - `Transaction is not mined yet. Check again later. elapsed=${ellapsedMs / 1000}s`, + `Transaction is not mined yet. Check again later. elapsed=${elapsedSeconds}s`, ); - // Resend the transaction (after some initial delay). + // Resend the transaction if `minEllapsedBlocksBeforeRetry` blocks or 120 seconds have passed since the last send attempt. const config = await getConfig(); const blockNumber = await getBlockNumberish(sentTransaction.chainId); - const ellapsedBlocks = blockNumber - sentTransaction.sentAtBlock; - if (ellapsedBlocks >= config.minEllapsedBlocksBeforeRetry) { + const elapsedBlocks = blockNumber - sentTransaction.sentAtBlock; + const shouldResend = + elapsedBlocks >= config.minEllapsedBlocksBeforeRetry || + elapsedSeconds > 120; + if (shouldResend) { job.log( - `Resending transaction after ${ellapsedBlocks} blocks. blockNumber=${blockNumber} sentAtBlock=${sentTransaction.sentAtBlock}`, + `Resending transaction after ${elapsedBlocks} blocks. blockNumber=${blockNumber} sentAtBlock=${sentTransaction.sentAtBlock}`, ); await SendTransactionQueue.add({ queueId: sentTransaction.queueId, From 0a8c39f4af19c4b10ff7b66053310bf48cebfe46 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Wed, 11 Dec 2024 18:28:22 -0600 Subject: [PATCH 41/44] regenerate sdk (#808) Co-authored-by: Phillip Ho --- .gitattributes | 1 + .gitignore | 3 + package.json | 3 +- sdk/src/services/AccountFactoryService.ts | 18 +- sdk/src/services/AccountService.ts | 54 +++-- sdk/src/services/BackendWalletService.ts | 116 ++++++++-- sdk/src/services/ChainService.ts | 2 +- sdk/src/services/ConfigurationService.ts | 7 +- sdk/src/services/ContractEventsService.ts | 4 +- sdk/src/services/ContractMetadataService.ts | 8 +- sdk/src/services/ContractRolesService.ts | 24 ++- sdk/src/services/ContractRoyaltiesService.ts | 24 ++- sdk/src/services/ContractService.ts | 16 +- .../services/ContractSubscriptionsService.ts | 13 +- sdk/src/services/DefaultService.ts | 11 + sdk/src/services/DeployService.ts | 104 ++++++--- sdk/src/services/Erc1155Service.ts | 198 ++++++++++++------ sdk/src/services/Erc20Service.ts | 136 ++++++++---- sdk/src/services/Erc721Service.ts | 166 ++++++++++----- .../MarketplaceDirectListingsService.ts | 86 +++++--- .../MarketplaceEnglishAuctionsService.ts | 50 ++--- sdk/src/services/MarketplaceOffersService.ts | 42 ++-- sdk/src/services/RelayerService.ts | 6 + sdk/src/services/TransactionService.ts | 18 +- sdk/src/services/WebhooksService.ts | 38 +++- src/server/listeners/update-tx-listener.ts | 14 +- src/server/middleware/auth.ts | 9 +- src/server/middleware/error.ts | 2 +- .../routes/auth/access-tokens/get-all.ts | 2 +- src/server/routes/auth/keypair/list.ts | 2 +- src/server/routes/auth/permissions/get-all.ts | 2 +- .../routes/backend-wallet/get-balance.ts | 2 +- .../backend-wallet/simulate-transaction.ts | 2 +- src/server/routes/chain/get-all.ts | 2 +- src/server/routes/configuration/auth/get.ts | 2 +- .../backend-wallet-balance/get.ts | 2 +- src/server/routes/configuration/cache/get.ts | 2 +- src/server/routes/configuration/chains/get.ts | 2 +- .../contract-subscriptions/get.ts | 2 +- src/server/routes/configuration/cors/add.ts | 4 +- src/server/routes/configuration/cors/get.ts | 2 +- src/server/routes/configuration/ip/get.ts | 2 +- .../routes/configuration/transactions/get.ts | 2 +- .../routes/contract/events/get-all-events.ts | 2 +- .../events/get-contract-event-logs.ts | 4 +- .../events/get-event-logs-by-timestamp.ts | 4 +- .../extensions/account-factory/index.ts | 2 +- .../contract/extensions/account/index.ts | 2 +- src/server/routes/contract/metadata/abi.ts | 2 +- src/server/routes/contract/metadata/events.ts | 2 +- .../routes/contract/metadata/extensions.ts | 2 +- .../routes/contract/metadata/functions.ts | 2 +- .../routes/contract/roles/read/get-all.ts | 2 +- src/server/routes/contract/roles/read/get.ts | 2 +- .../add-contract-subscription.ts | 2 +- .../get-contract-subscriptions.ts | 2 +- src/server/routes/deploy/contract-types.ts | 6 +- src/server/routes/deploy/index.ts | 2 +- src/server/routes/deploy/prebuilt.ts | 2 +- src/server/routes/relayer/get-all.ts | 2 +- src/server/routes/relayer/index.ts | 2 +- src/server/routes/system/queue.ts | 2 +- .../blockchain/get-user-op-receipt.ts | 2 +- src/server/routes/transaction/cancel.ts | 2 +- src/server/routes/transaction/status.ts | 2 +- src/server/routes/webhooks/events.ts | 2 +- src/server/routes/webhooks/get-all.ts | 2 +- src/server/schemas/erc20/index.ts | 2 +- src/server/schemas/event-log.ts | 4 +- src/server/schemas/nft/index.ts | 4 +- src/server/schemas/websocket/index.ts | 2 +- src/server/utils/marketplace-v3.ts | 2 +- src/server/utils/openapi.ts | 4 +- src/server/utils/validator.ts | 9 +- src/server/utils/websocket.ts | 12 +- .../create-contract-transaction-receipts.ts | 4 +- src/shared/db/keypair/delete.ts | 2 +- src/shared/db/keypair/get.ts | 2 +- src/shared/db/keypair/list.ts | 2 +- src/shared/db/tokens/create-token.ts | 2 +- src/shared/db/transactions/db.ts | 8 +- .../db/wallets/delete-wallet-details.ts | 2 +- src/shared/db/wallets/get-all-wallets.ts | 2 +- src/shared/db/webhooks/create-webhook.ts | 4 +- src/shared/db/webhooks/get-all-webhooks.ts | 2 +- src/shared/schemas/prisma.ts | 2 +- src/shared/utils/block.ts | 4 +- src/shared/utils/cache/clear-cache.ts | 2 +- src/shared/utils/cron/clear-cache-cron.ts | 2 +- src/shared/utils/cron/is-valid-cron.ts | 2 +- src/shared/utils/crypto.ts | 2 +- src/shared/utils/logger.ts | 5 +- .../utils/transaction/cancel-transaction.ts | 2 +- src/shared/utils/usage.ts | 2 +- src/shared/utils/webhook.ts | 2 +- src/worker/listeners/config-listener.ts | 26 +-- src/worker/listeners/webhook-listener.ts | 28 +-- src/worker/queues/send-transaction-queue.ts | 2 +- src/worker/tasks/process-event-logs-worker.ts | 2 +- 99 files changed, 932 insertions(+), 481 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..176a458f9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.gitignore b/.gitignore index 5e4780803..1c447602d 100644 --- a/.gitignore +++ b/.gitignore @@ -149,3 +149,6 @@ https # Auto generated OpenAPI file openapi.json .aider* + +# Jetbrains IDEs +.idea diff --git a/package.json b/package.json index 8ef90a411..92febd9a8 100644 --- a/package.json +++ b/package.json @@ -104,5 +104,6 @@ "secp256k1": ">=4.0.4", "ws": ">=8.17.1", "cross-spawn": ">=7.0.6" - } + }, + "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" } diff --git a/sdk/src/services/AccountFactoryService.ts b/sdk/src/services/AccountFactoryService.ts index 5d8c45882..76890ee65 100644 --- a/sdk/src/services/AccountFactoryService.ts +++ b/sdk/src/services/AccountFactoryService.ts @@ -12,7 +12,7 @@ export class AccountFactoryService { /** * Get all smart accounts * Get all the smart accounts for this account factory. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -45,7 +45,7 @@ export class AccountFactoryService { * Get associated smart accounts * Get all the smart accounts for this account factory associated with the specific admin wallet. * @param signerAddress The address of the signer to get associated accounts from - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -82,7 +82,7 @@ export class AccountFactoryService { * Check if deployed * Check if a smart account has been deployed to the blockchain. * @param adminAddress The address of the admin to check if the account address is deployed - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param extraData Extra data to use in predicting the account address * @returns any Default Response @@ -122,7 +122,7 @@ export class AccountFactoryService { * Predict smart account address * Get the counterfactual address of a smart account. * @param adminAddress The address of the admin to predict the account address for - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param extraData Extra data (account salt) to add to use in predicting the account address * @returns any Default Response @@ -161,14 +161,14 @@ export class AccountFactoryService { /** * Create smart account * Create a smart account for this account factory. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -191,6 +191,10 @@ export class AccountFactoryService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/AccountService.ts b/sdk/src/services/AccountService.ts index 31a575a90..f65d53821 100644 --- a/sdk/src/services/AccountService.ts +++ b/sdk/src/services/AccountService.ts @@ -12,7 +12,7 @@ export class AccountService { /** * Get all admins * Get all admins for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -44,7 +44,7 @@ export class AccountService { /** * Get all session keys * Get all session keys for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -82,14 +82,14 @@ export class AccountService { /** * Grant admin * Grant a smart account's admin permission. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -108,6 +108,10 @@ export class AccountService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -169,14 +173,14 @@ export class AccountService { /** * Revoke admin * Revoke a smart account's admin permission. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -195,6 +199,10 @@ export class AccountService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -256,14 +264,14 @@ export class AccountService { /** * Create session key * Create a session key for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -286,6 +294,10 @@ export class AccountService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -347,14 +359,14 @@ export class AccountService { /** * Revoke session key * Revoke a session key for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -373,6 +385,10 @@ export class AccountService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -434,14 +450,14 @@ export class AccountService { /** * Update session key * Update a session key for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -464,6 +480,10 @@ export class AccountService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/BackendWalletService.ts b/sdk/src/services/BackendWalletService.ts index b9657572e..fdc0107c8 100644 --- a/sdk/src/services/BackendWalletService.ts +++ b/sdk/src/services/BackendWalletService.ts @@ -210,7 +210,7 @@ export class BackendWalletService { /** * Get balance * Get the native balance for a backend wallet. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param walletAddress Backend wallet address * @returns any Default Response * @throws ApiError @@ -295,10 +295,10 @@ export class BackendWalletService { /** * Transfer tokens * Transfer native currency or ERC20 tokens to another wallet. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError @@ -324,6 +324,10 @@ export class BackendWalletService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -378,10 +382,10 @@ export class BackendWalletService { /** * Withdraw funds * Withdraw all funds from this wallet to another wallet. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError @@ -399,6 +403,10 @@ export class BackendWalletService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -453,13 +461,13 @@ export class BackendWalletService { /** * Send a transaction * Send a transaction with transaction parameters - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -479,6 +487,10 @@ export class BackendWalletService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -535,7 +547,7 @@ export class BackendWalletService { /** * Send a batch of raw transactions * Send a batch of raw transactions with transaction parameters - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param requestBody @@ -558,6 +570,10 @@ export class BackendWalletService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -615,7 +631,6 @@ export class BackendWalletService { requestBody: { transaction: { to?: string; - from?: string; nonce?: string; gasLimit?: string; gasPrice?: string; @@ -626,7 +641,6 @@ export class BackendWalletService { accessList?: any; maxFeePerGas?: string; maxPriorityFeePerGas?: string; - customData?: Record; ccipReadEnabled?: boolean; }; }, @@ -729,7 +743,7 @@ export class BackendWalletService { * Get recent transactions * Get recent transactions for this backend wallet. * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param walletAddress Backend wallet address * @param page Specify the page number. * @param limit Specify the number of results to return per page. @@ -825,7 +839,7 @@ export class BackendWalletService { * Get recent transactions by nonce * Get recent transactions for this backend wallet, sorted by descending nonce. * @param fromNonce The earliest nonce, inclusive. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param walletAddress Backend wallet address * @param toNonce The latest nonce, inclusive. If omitted, queries up to the latest sent nonce. * @returns any Default Response @@ -918,17 +932,85 @@ export class BackendWalletService { /** * Reset nonces * Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens. + * @param requestBody * @returns any Default Response * @throws ApiError */ - public resetNonces(): CancelablePromise<{ + public resetNonces( + requestBody?: { + /** + * The chain ID to reset nonces for. + */ + chainId?: number; + /** + * The backend wallet address to reset nonces for. Omit to reset all backend wallets. + */ + walletAddress?: string; + }, + ): CancelablePromise<{ result: { status: string; + /** + * The number of backend wallets processed. + */ + count: number; }; }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/reset-nonces', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Cancel nonces + * Cancel all nonces up to the provided nonce. This is useful to unblock a backend wallet that has transactions waiting for nonces to be mined. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public cancelNonces( + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The nonce to cancel up to, inclusive. Example: If the onchain nonce is 10 and 'toNonce' is 15, this request will cancel nonces: 11, 12, 13, 14, 15 + */ + toNonce: number; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: { + cancelledNonces: Array; + }; + }> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/{chain}/cancel-nonces', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', errors: { 400: `Bad Request`, 404: `Not Found`, @@ -940,7 +1022,7 @@ export class BackendWalletService { /** * Get nonce * Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param walletAddress Backend wallet address * @returns any Default Response * @throws ApiError @@ -971,12 +1053,12 @@ export class BackendWalletService { /** * Simulate a transaction * Simulate a transaction with transaction parameters - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError diff --git a/sdk/src/services/ChainService.ts b/sdk/src/services/ChainService.ts index efa9808fa..f2fb6e544 100644 --- a/sdk/src/services/ChainService.ts +++ b/sdk/src/services/ChainService.ts @@ -12,7 +12,7 @@ export class ChainService { /** * Get chain details * Get details about a chain. - * @param chain Chain name or ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @returns any Default Response * @throws ApiError */ diff --git a/sdk/src/services/ConfigurationService.ts b/sdk/src/services/ConfigurationService.ts index dc25260be..57b32942e 100644 --- a/sdk/src/services/ConfigurationService.ts +++ b/sdk/src/services/ConfigurationService.ts @@ -287,14 +287,12 @@ export class ConfigurationService { */ public updateTransactionConfiguration( requestBody?: { - minTxsToProcess?: number; maxTxsToProcess?: number; - minedTxListenerCronSchedule?: (string | null); maxTxsToUpdate?: number; + minedTxListenerCronSchedule?: (string | null); retryTxListenerCronSchedule?: (string | null); minEllapsedBlocksBeforeRetry?: number; maxFeePerGasForRetries?: string; - maxPriorityFeePerGasForRetries?: string; maxRetriesPerTx?: number; }, ): CancelablePromise<{ @@ -622,6 +620,9 @@ export class ConfigurationService { public updateContractSubscriptionsConfiguration( requestBody?: { maxBlocksToIndex?: number; + /** + * Requery after one or more delays. Use comma-separated positive integers. Example: "2,10" means requery after 2s and 10s. + */ contractSubscriptionsRequeryDelaySeconds?: string; }, ): CancelablePromise<{ diff --git a/sdk/src/services/ContractEventsService.ts b/sdk/src/services/ContractEventsService.ts index 276932408..a15c9eab8 100644 --- a/sdk/src/services/ContractEventsService.ts +++ b/sdk/src/services/ContractEventsService.ts @@ -12,7 +12,7 @@ export class ContractEventsService { /** * Get all events * Get a list of all blockchain events for this contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param fromBlock * @param toBlock @@ -52,7 +52,7 @@ export class ContractEventsService { /** * Get events * Get a list of specific blockchain events emitted from this contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody Specify the from and to block numbers to get events for, defaults to all blocks * @returns any Default Response diff --git a/sdk/src/services/ContractMetadataService.ts b/sdk/src/services/ContractMetadataService.ts index 4fd15e17b..7fb08c2f4 100644 --- a/sdk/src/services/ContractMetadataService.ts +++ b/sdk/src/services/ContractMetadataService.ts @@ -12,7 +12,7 @@ export class ContractMetadataService { /** * Get ABI * Get the ABI of a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -67,7 +67,7 @@ export class ContractMetadataService { /** * Get events * Get details of all events implemented by a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -121,7 +121,7 @@ export class ContractMetadataService { /** * Get extensions * Get all detected extensions for a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -153,7 +153,7 @@ export class ContractMetadataService { /** * Get functions * Get details of all functions implemented by the contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError diff --git a/sdk/src/services/ContractRolesService.ts b/sdk/src/services/ContractRolesService.ts index e840a305a..a078e3d9d 100644 --- a/sdk/src/services/ContractRolesService.ts +++ b/sdk/src/services/ContractRolesService.ts @@ -13,7 +13,7 @@ export class ContractRolesService { * Get wallets for role * Get all wallets with a specific role for a contract. * @param role The role to list wallet members - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -46,7 +46,7 @@ export class ContractRolesService { /** * Get wallets for all roles * Get all wallets in each role for a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -85,14 +85,14 @@ export class ContractRolesService { /** * Grant role * Grant a role to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -115,6 +115,10 @@ export class ContractRolesService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -176,14 +180,14 @@ export class ContractRolesService { /** * Revoke role * Revoke a role from a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -206,6 +210,10 @@ export class ContractRolesService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/ContractRoyaltiesService.ts b/sdk/src/services/ContractRoyaltiesService.ts index f60c24986..95a61b756 100644 --- a/sdk/src/services/ContractRoyaltiesService.ts +++ b/sdk/src/services/ContractRoyaltiesService.ts @@ -12,7 +12,7 @@ export class ContractRoyaltiesService { /** * Get royalty details * Gets the royalty recipient and BPS (basis points) of the smart contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -51,7 +51,7 @@ export class ContractRoyaltiesService { * Get token royalty details * Gets the royalty recipient and BPS (basis points) of a particular token in the contract. * @param tokenId - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -91,14 +91,14 @@ export class ContractRoyaltiesService { /** * Set royalty details * Set the royalty recipient and fee for the smart contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -121,6 +121,10 @@ export class ContractRoyaltiesService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -182,14 +186,14 @@ export class ContractRoyaltiesService { /** * Set token royalty details * Set the royalty recipient and fee for a particular token in the contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -216,6 +220,10 @@ export class ContractRoyaltiesService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/ContractService.ts b/sdk/src/services/ContractService.ts index a7109ef70..7a3eb1daf 100644 --- a/sdk/src/services/ContractService.ts +++ b/sdk/src/services/ContractService.ts @@ -13,7 +13,7 @@ export class ContractService { * Read from contract * Call a read function on a contract. * @param functionName Name of the function to call on Contract - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param args Arguments for the function. Comma Separated * @returns any Default Response @@ -49,14 +49,14 @@ export class ContractService { /** * Write to contract * Call a write function on a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -67,11 +67,11 @@ export class ContractService { xBackendWalletAddress: string, requestBody: { /** - * The function to call on the contract + * The function to call on the contract. It is highly recommended to provide a full function signature, such as "function mintTo(address to, uint256 amount)", to avoid ambiguity and to skip ABI resolution. */ functionName: string; /** - * The arguments to call on the function + * An array of arguments to provide the function. Supports: numbers, strings, arrays, objects. Do not provide: BigNumber, bigint, Date objects */ args: Array; txOverrides?: { @@ -79,6 +79,10 @@ export class ContractService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/ContractSubscriptionsService.ts b/sdk/src/services/ContractSubscriptionsService.ts index cfa357f5b..2bfbfcca1 100644 --- a/sdk/src/services/ContractSubscriptionsService.ts +++ b/sdk/src/services/ContractSubscriptionsService.ts @@ -24,13 +24,13 @@ export class ContractSubscriptionsService { */ contractAddress: string; webhook?: { + id: number; url: string; name: (string | null); secret?: string; eventType: string; active: boolean; createdAt: string; - id: number; }; processEventLogs: boolean; filterEvents: Array; @@ -60,7 +60,7 @@ export class ContractSubscriptionsService { public addContractSubscription( requestBody: { /** - * The chain for the contract. + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. */ chain: string; /** @@ -97,13 +97,13 @@ export class ContractSubscriptionsService { */ contractAddress: string; webhook?: { + id: number; url: string; name: (string | null); secret?: string; eventType: string; active: boolean; createdAt: string; - id: number; }; processEventLogs: boolean; filterEvents: Array; @@ -160,7 +160,7 @@ export class ContractSubscriptionsService { /** * Get subscribed contract indexed block range * Gets the subscribed contract's indexed block range - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -170,6 +170,9 @@ export class ContractSubscriptionsService { contractAddress: string, ): CancelablePromise<{ result: { + /** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ chain: string; /** * A contract or wallet address @@ -198,7 +201,7 @@ export class ContractSubscriptionsService { /** * Get last processed block * Get the last processed block for a chain. - * @param chain Chain name or ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @returns any Default Response * @throws ApiError */ diff --git a/sdk/src/services/DefaultService.ts b/sdk/src/services/DefaultService.ts index 1f2aac2a7..54389d7a7 100644 --- a/sdk/src/services/DefaultService.ts +++ b/sdk/src/services/DefaultService.ts @@ -31,4 +31,15 @@ export class DefaultService { }); } + /** + * @returns any Default Response + * @throws ApiError + */ + public getJson1(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/json/', + }); + } + } diff --git a/sdk/src/services/DeployService.ts b/sdk/src/services/DeployService.ts index 19ac25673..9e067a725 100644 --- a/sdk/src/services/DeployService.ts +++ b/sdk/src/services/DeployService.ts @@ -12,12 +12,12 @@ export class DeployService { /** * Deploy Edition * Deploy an Edition contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -57,6 +57,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -114,12 +118,12 @@ export class DeployService { /** * Deploy Edition Drop * Deploy an Edition Drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -160,6 +164,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -217,12 +225,12 @@ export class DeployService { /** * Deploy Marketplace * Deploy a Marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -258,6 +266,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -315,12 +327,12 @@ export class DeployService { /** * Deploy Multiwrap * Deploy a Multiwrap contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -357,6 +369,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -414,12 +430,12 @@ export class DeployService { /** * Deploy NFT Collection * Deploy an NFT Collection contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -459,6 +475,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -516,12 +536,12 @@ export class DeployService { /** * Deploy NFT Drop * Deploy an NFT Drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -562,6 +582,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -619,12 +643,12 @@ export class DeployService { /** * Deploy Pack * Deploy a Pack contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -663,6 +687,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -720,12 +748,12 @@ export class DeployService { /** * Deploy Signature Drop * Deploy a Signature Drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -766,6 +794,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -823,12 +855,12 @@ export class DeployService { /** * Deploy Split * Deploy a Split contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -869,6 +901,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -926,12 +962,12 @@ export class DeployService { /** * Deploy Token * Deploy a Token contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -969,6 +1005,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1026,12 +1066,12 @@ export class DeployService { /** * Deploy Token Drop * Deploy a Token Drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1070,6 +1110,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1127,12 +1171,12 @@ export class DeployService { /** * Deploy Vote * Deploy a Vote contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1174,6 +1218,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1231,14 +1279,14 @@ export class DeployService { /** * Deploy published contract * Deploy a published contract to the blockchain. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param publisher Address or ENS of the publisher of the contract * @param contractName Name of the published contract to deploy * @param xBackendWalletAddress Backend wallet address * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1269,6 +1317,10 @@ export class DeployService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/Erc1155Service.ts b/sdk/src/services/Erc1155Service.ts index b9e834913..b71217414 100644 --- a/sdk/src/services/Erc1155Service.ts +++ b/sdk/src/services/Erc1155Service.ts @@ -13,7 +13,7 @@ export class Erc1155Service { * Get details * Get the details for a token in an ERC-1155 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError @@ -52,7 +52,7 @@ export class Erc1155Service { /** * Get all details * Get details for all tokens in an ERC-1155 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param start The start token ID for paginated results. Defaults to 0. * @param count The page count for paginated results. Defaults to 100. @@ -96,7 +96,7 @@ export class Erc1155Service { * Get owned tokens * Get all tokens in an ERC-1155 contract owned by a specific wallet. * @param walletAddress Address of the wallet to get NFTs for - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError @@ -137,7 +137,7 @@ export class Erc1155Service { * Get the balance of a specific wallet address for this ERC-1155 contract. * @param walletAddress Address of the wallet to check NFT balance * @param tokenId The tokenId of the NFT to check balance of - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError @@ -174,7 +174,7 @@ export class Erc1155Service { * Check if the specific wallet has approved transfers from a specific operator wallet. * @param ownerWallet Address of the wallet who owns the NFT * @param operator Address of the operator to check approval on - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError @@ -209,7 +209,7 @@ export class Erc1155Service { /** * Get total supply * Get the total supply in circulation for this ERC-1155 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError @@ -239,7 +239,7 @@ export class Erc1155Service { * Get total supply * Get the total supply in circulation for this ERC-1155 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError @@ -272,12 +272,12 @@ export class Erc1155Service { /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is typically called by the token contract owner. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. * @param requestBody @@ -372,7 +372,13 @@ export class Erc1155Service { royaltyRecipient?: string; royaltyBps?: number; primarySaleRecipient?: string; + /** + * An amount in native token (decimals allowed). Example: "0.1" + */ pricePerToken?: string; + /** + * An amount in wei (no decimals). Example: "50000000000" + */ pricePerTokenWei?: string; currency?: string; validityStartTimestamp: number; @@ -551,7 +557,7 @@ export class Erc1155Service { * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. * @param tokenId The token ID of the NFT you want to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response @@ -590,7 +596,7 @@ export class Erc1155Service { * Get currently active claim phase for a specific token ID. * Retrieve the currently active claim phase for a specific token ID, if any. * @param tokenId The token ID of the NFT you want to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response @@ -654,7 +660,7 @@ export class Erc1155Service { * Get all the claim phases configured for a specific token ID. * Get all the claim phases configured for a specific token ID. * @param tokenId The token ID of the NFT you want to get the claim conditions for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response @@ -719,7 +725,7 @@ export class Erc1155Service { * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param tokenId The token ID of the NFT you want to get the claimer proofs for. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -768,7 +774,7 @@ export class Erc1155Service { * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param tokenId The token ID of the NFT you want to check if the wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response @@ -806,14 +812,14 @@ export class Erc1155Service { /** * Airdrop tokens * Airdrop ERC-1155 tokens to specific wallets. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -842,6 +848,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -903,14 +913,14 @@ export class Erc1155Service { /** * Burn token * Burn ERC-1155 tokens in the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -933,6 +943,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -994,14 +1008,14 @@ export class Erc1155Service { /** * Burn tokens (batch) * Burn a batch of ERC-1155 tokens in the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1018,6 +1032,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1079,14 +1097,14 @@ export class Erc1155Service { /** * Claim tokens to wallet * Claim ERC-1155 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1108,11 +1126,19 @@ export class Erc1155Service { * Quantity of NFTs to mint */ quantity: string; + /** + * Whether the drop is a single phase drop + */ + singlePhaseDrop?: boolean; txOverrides?: { /** * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1174,14 +1200,14 @@ export class Erc1155Service { /** * Lazy mint * Lazy mint ERC-1155 tokens to be claimed in the future. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1230,6 +1256,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1291,14 +1321,14 @@ export class Erc1155Service { /** * Mint additional supply * Mint additional supply of ERC-1155 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1325,6 +1355,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1386,14 +1420,14 @@ export class Erc1155Service { /** * Mint tokens (batch) * Mint ERC-1155 tokens to multiple wallets in one transaction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1449,6 +1483,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1510,14 +1548,14 @@ export class Erc1155Service { /** * Mint tokens * Mint ERC-1155 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1573,6 +1611,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1634,14 +1676,14 @@ export class Erc1155Service { /** * Set approval for all * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1664,6 +1706,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1725,14 +1771,14 @@ export class Erc1155Service { /** * Transfer token * Transfer an ERC-1155 token from the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1763,6 +1809,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1824,14 +1874,14 @@ export class Erc1155Service { /** * Transfer token from wallet * Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1866,6 +1916,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1927,14 +1981,14 @@ export class Erc1155Service { /** * Signature mint * Mint ERC-1155 tokens from a generated signature. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -2031,6 +2085,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -2092,14 +2150,14 @@ export class Erc1155Service { /** * Overwrite the claim conditions for a specific token ID.. * Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -2135,6 +2193,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -2196,14 +2258,14 @@ export class Erc1155Service { /** * Overwrite the claim conditions for a specific token ID.. * Allows you to set claim conditions for multiple token IDs in a single transaction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -2241,6 +2303,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -2302,14 +2368,14 @@ export class Erc1155Service { /** * Update a single claim phase. * Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase configuration. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -2348,6 +2414,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -2409,14 +2479,14 @@ export class Erc1155Service { /** * Update token metadata * Update the metadata for an ERC1155 token. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -2469,6 +2539,10 @@ export class Erc1155Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/Erc20Service.ts b/sdk/src/services/Erc20Service.ts index 7e3fdd9f3..1e4008aba 100644 --- a/sdk/src/services/Erc20Service.ts +++ b/sdk/src/services/Erc20Service.ts @@ -14,7 +14,7 @@ export class Erc20Service { * Get the allowance of a specific wallet for an ERC-20 contract. * @param ownerWallet Address of the wallet who owns the funds * @param spenderWallet Address of the wallet to check token allowance - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError @@ -62,7 +62,7 @@ export class Erc20Service { * Get token balance * Get the balance of a specific wallet address for this ERC-20 contract. * @param walletAddress Address of the wallet to check token balance - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError @@ -107,7 +107,7 @@ export class Erc20Service { /** * Get token details * Get details for this ERC-20 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError @@ -140,7 +140,7 @@ export class Erc20Service { /** * Get total supply * Get the total supply in circulation for this ERC-20 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError @@ -181,12 +181,12 @@ export class Erc20Service { /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is typically called by the token contract owner. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. * @param requestBody @@ -329,7 +329,7 @@ export class Erc20Service { * Check if tokens are available for claiming * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response @@ -365,7 +365,7 @@ export class Erc20Service { /** * Retrieve the currently active claim phase, if any. * Retrieve the currently active claim phase, if any. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response @@ -426,7 +426,7 @@ export class Erc20Service { /** * Get all the claim phases configured. * Get all the claim phases configured on the drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response @@ -488,7 +488,7 @@ export class Erc20Service { * Get claim ineligibility reasons * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response @@ -525,7 +525,7 @@ export class Erc20Service { * Get claimer proofs * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -570,14 +570,14 @@ export class Erc20Service { /** * Set allowance * Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -600,6 +600,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -661,14 +665,14 @@ export class Erc20Service { /** * Transfer tokens * Transfer ERC-20 tokens from the caller wallet to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -691,6 +695,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -752,14 +760,14 @@ export class Erc20Service { /** * Transfer tokens from wallet * Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -786,6 +794,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -847,14 +859,14 @@ export class Erc20Service { /** * Burn token * Burn ERC-20 tokens in the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -873,6 +885,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -934,14 +950,14 @@ export class Erc20Service { /** * Burn token from wallet * Burn ERC-20 tokens in a specific wallet. Requires allowance. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -964,6 +980,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1025,14 +1045,14 @@ export class Erc20Service { /** * Claim tokens to wallet * Claim ERC-20 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1050,11 +1070,19 @@ export class Erc20Service { * The amount of tokens to claim. */ amount: string; + /** + * Whether the drop is a single phase drop + */ + singlePhaseDrop?: boolean; txOverrides?: { /** * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1116,14 +1144,14 @@ export class Erc20Service { /** * Mint tokens (batch) * Mint ERC-20 tokens to multiple wallets in one transaction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1148,6 +1176,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1209,14 +1241,14 @@ export class Erc20Service { /** * Mint tokens * Mint ERC-20 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1239,6 +1271,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1300,14 +1336,14 @@ export class Erc20Service { /** * Signature mint * Mint ERC-20 tokens from a generated signature. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1360,6 +1396,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1421,14 +1461,14 @@ export class Erc20Service { /** * Overwrite the claim conditions for the drop. * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1460,6 +1500,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1521,14 +1565,14 @@ export class Erc20Service { /** * Update a single claim phase. * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1563,6 +1607,10 @@ export class Erc20Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/Erc721Service.ts b/sdk/src/services/Erc721Service.ts index 3fcf716dd..a63a8e363 100644 --- a/sdk/src/services/Erc721Service.ts +++ b/sdk/src/services/Erc721Service.ts @@ -13,7 +13,7 @@ export class Erc721Service { * Get details * Get the details for a token in an ERC-721 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -52,7 +52,7 @@ export class Erc721Service { /** * Get all details * Get details for all tokens in an ERC-721 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param start The start token id for paginated results. Defaults to 0. * @param count The page count for paginated results. Defaults to 100. @@ -96,7 +96,7 @@ export class Erc721Service { * Get owned tokens * Get all tokens in an ERC-721 contract owned by a specific wallet. * @param walletAddress Address of the wallet to get NFTs for - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -136,7 +136,7 @@ export class Erc721Service { * Get token balance * Get the balance of a specific wallet address for this ERC-721 contract. * @param walletAddress Address of the wallet to check NFT balance - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC721 contract address * @returns any Default Response * @throws ApiError @@ -171,7 +171,7 @@ export class Erc721Service { * Check if the specific wallet has approved transfers from a specific operator wallet. * @param ownerWallet Address of the wallet who owns the NFT * @param operator Address of the operator to check approval on - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -206,7 +206,7 @@ export class Erc721Service { /** * Get total supply * Get the total supply in circulation for this ERC-721 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -235,7 +235,7 @@ export class Erc721Service { /** * Get claimed supply * Get the claimed supply for this ERC-721 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -264,7 +264,7 @@ export class Erc721Service { /** * Get unclaimed supply * Get the unclaimed supply for this ERC-721 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -294,7 +294,7 @@ export class Erc721Service { * Check if tokens are available for claiming * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response @@ -330,7 +330,7 @@ export class Erc721Service { /** * Retrieve the currently active claim phase, if any. * Retrieve the currently active claim phase, if any. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response @@ -391,7 +391,7 @@ export class Erc721Service { /** * Get all the claim phases configured for the drop. * Get all the claim phases configured for the drop. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response @@ -453,7 +453,7 @@ export class Erc721Service { * Get claim ineligibility reasons * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response @@ -490,7 +490,7 @@ export class Erc721Service { * Get claimer proofs * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -535,14 +535,14 @@ export class Erc721Service { /** * Set approval for all * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -565,6 +565,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -626,14 +630,14 @@ export class Erc721Service { /** * Set approval for token * Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -656,6 +660,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -717,14 +725,14 @@ export class Erc721Service { /** * Transfer token * Transfer an ERC-721 token from the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -747,6 +755,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -808,14 +820,14 @@ export class Erc721Service { /** * Transfer token from wallet * Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -842,6 +854,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -903,14 +919,14 @@ export class Erc721Service { /** * Mint tokens * Mint ERC-721 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -963,6 +979,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1024,14 +1044,14 @@ export class Erc721Service { /** * Mint tokens (batch) * Mint ERC-721 tokens to multiple wallets in one transaction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1084,6 +1104,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1145,14 +1169,14 @@ export class Erc721Service { /** * Burn token * Burn ERC-721 tokens in the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1171,6 +1195,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1232,14 +1260,14 @@ export class Erc721Service { /** * Lazy mint * Lazy mint ERC-721 tokens to be claimed in the future. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1288,6 +1316,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1349,14 +1381,14 @@ export class Erc721Service { /** * Claim tokens to wallet * Claim ERC-721 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1374,11 +1406,19 @@ export class Erc721Service { * Quantity of NFTs to mint */ quantity: string; + /** + * Whether the drop is a single phase drop + */ + singlePhaseDrop?: boolean; txOverrides?: { /** * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1440,12 +1480,12 @@ export class Erc721Service { /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is typically called by the token contract owner. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC721 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. * @param requestBody @@ -1742,14 +1782,14 @@ export class Erc721Service { /** * Signature mint * Mint ERC-721 tokens from a generated signature. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1859,6 +1899,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -1920,14 +1964,14 @@ export class Erc721Service { /** * Overwrite the claim conditions for the drop. * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1959,6 +2003,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -2020,14 +2068,14 @@ export class Erc721Service { /** * Update a single claim phase. * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -2062,6 +2110,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -2123,7 +2175,7 @@ export class Erc721Service { /** * Prepare signature * Prepares a payload for a wallet to generate a signature. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC721 contract address * @param requestBody * @returns any Default Response @@ -2299,14 +2351,14 @@ export class Erc721Service { /** * Update token metadata * Update the metadata for an ERC721 token. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -2359,6 +2411,10 @@ export class Erc721Service { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/MarketplaceDirectListingsService.ts b/sdk/src/services/MarketplaceDirectListingsService.ts index 647a0de13..467fcf80f 100644 --- a/sdk/src/services/MarketplaceDirectListingsService.ts +++ b/sdk/src/services/MarketplaceDirectListingsService.ts @@ -12,11 +12,11 @@ export class MarketplaceDirectListingsService { /** * Get all listings * Get all direct listings for this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response @@ -107,11 +107,11 @@ export class MarketplaceDirectListingsService { /** * Get all valid listings * Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, and the creator still owns & has approved Marketplace to transfer the listed NFTs. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response @@ -203,7 +203,7 @@ export class MarketplaceDirectListingsService { * Get direct listing * Gets a direct listing on this marketplace contract. * @param listingId The id of the listing to retrieve. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -287,7 +287,7 @@ export class MarketplaceDirectListingsService { * Check if a buyer is approved to purchase a specific direct listing. * @param listingId The id of the listing to retrieve. * @param walletAddress The wallet address of the buyer to check. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -324,7 +324,7 @@ export class MarketplaceDirectListingsService { * Check if a currency is approved for a specific direct listing. * @param listingId The id of the listing to retrieve. * @param currencyContractAddress The smart contract address of the ERC20 token to check. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -359,7 +359,7 @@ export class MarketplaceDirectListingsService { /** * Transfer token from wallet * Get the total number of direct listings on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -388,14 +388,14 @@ export class MarketplaceDirectListingsService { /** * Create direct listing * Create a direct listing on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -442,6 +442,10 @@ export class MarketplaceDirectListingsService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -503,14 +507,14 @@ export class MarketplaceDirectListingsService { /** * Update direct listing * Update a direct listing on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -561,6 +565,10 @@ export class MarketplaceDirectListingsService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -622,14 +630,14 @@ export class MarketplaceDirectListingsService { /** * Buy from direct listing * Buy from a specific direct listing from this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -656,6 +664,10 @@ export class MarketplaceDirectListingsService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -717,14 +729,14 @@ export class MarketplaceDirectListingsService { /** * Approve buyer for reserved listing * Approve a wallet address to buy from a reserved listing. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -747,6 +759,10 @@ export class MarketplaceDirectListingsService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -808,14 +824,14 @@ export class MarketplaceDirectListingsService { /** * Revoke approval for reserved listings * Revoke approval for a buyer to purchase a reserved listing. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -838,6 +854,10 @@ export class MarketplaceDirectListingsService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -899,14 +919,14 @@ export class MarketplaceDirectListingsService { /** * Revoke currency approval for reserved listing * Revoke approval of a currency for a reserved listing. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -929,6 +949,10 @@ export class MarketplaceDirectListingsService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -990,14 +1014,14 @@ export class MarketplaceDirectListingsService { /** * Cancel direct listing * Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -1016,6 +1040,10 @@ export class MarketplaceDirectListingsService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/MarketplaceEnglishAuctionsService.ts b/sdk/src/services/MarketplaceEnglishAuctionsService.ts index ff9fc197a..631a58b28 100644 --- a/sdk/src/services/MarketplaceEnglishAuctionsService.ts +++ b/sdk/src/services/MarketplaceEnglishAuctionsService.ts @@ -12,11 +12,11 @@ export class MarketplaceEnglishAuctionsService { /** * Get all English auctions * Get all English auction listings on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response @@ -115,11 +115,11 @@ export class MarketplaceEnglishAuctionsService { /** * Get all valid English auctions * Get all valid English auction listings on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response @@ -219,7 +219,7 @@ export class MarketplaceEnglishAuctionsService { * Get English auction * Get a specific English auction listing on this marketplace contract. * @param listingId The id of the listing to retrieve. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -313,7 +313,7 @@ export class MarketplaceEnglishAuctionsService { * If there is no current bid, the bid must be at least the minimum bid amount. * Returns the value in percentage format, e.g. 100 = 1%. * @param listingId The id of the listing to retrieve. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -352,7 +352,7 @@ export class MarketplaceEnglishAuctionsService { * If there is no current bid, the bid must be at least the minimum bid amount. * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. * @param listingId The id of the listing to retrieve. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -395,7 +395,7 @@ export class MarketplaceEnglishAuctionsService { * Get winning bid * Get the current highest bid of an active auction. * @param listingId The ID of the listing to retrieve the winner for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -455,7 +455,7 @@ export class MarketplaceEnglishAuctionsService { /** * Get total listings * Get the count of English auction listings on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -486,7 +486,7 @@ export class MarketplaceEnglishAuctionsService { * Check if a bid is or will be the winning bid for an auction. * @param listingId The ID of the listing to retrieve the winner for. * @param bidAmount The amount of the bid to check if it is the winning bid. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -522,7 +522,7 @@ export class MarketplaceEnglishAuctionsService { * Get winner * Get the winner of an English auction. Can only be called after the auction has ended. * @param listingId The ID of the listing to retrieve the winner for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -555,10 +555,10 @@ export class MarketplaceEnglishAuctionsService { /** * Buyout English auction * Buyout the listing for this auction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ @@ -603,10 +603,10 @@ export class MarketplaceEnglishAuctionsService { /** * Cancel English auction * Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ @@ -651,10 +651,10 @@ export class MarketplaceEnglishAuctionsService { /** * Create English auction * Create an English auction listing on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ @@ -738,10 +738,10 @@ export class MarketplaceEnglishAuctionsService { * execute the sale for the buyer, meaning the buyer receives the NFT(s). * You must also call closeAuctionForSeller to execute the sale for the seller, * meaning the seller receives the payment from the highest bid. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ @@ -788,10 +788,10 @@ export class MarketplaceEnglishAuctionsService { * After an auction has concluded (and a buyout did not occur), * execute the sale for the seller, meaning the seller receives the payment from the highest bid. * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ @@ -838,10 +838,10 @@ export class MarketplaceEnglishAuctionsService { * Close the auction for both buyer and seller. * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. * This function can only be called after the auction has ended. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ @@ -886,10 +886,10 @@ export class MarketplaceEnglishAuctionsService { /** * Make bid * Place a bid on an English auction listing. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ diff --git a/sdk/src/services/MarketplaceOffersService.ts b/sdk/src/services/MarketplaceOffersService.ts index 3d25ebf17..c264f2325 100644 --- a/sdk/src/services/MarketplaceOffersService.ts +++ b/sdk/src/services/MarketplaceOffersService.ts @@ -12,11 +12,11 @@ export class MarketplaceOffersService { /** * Get all offers * Get all offers on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param offeror has offers from this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response @@ -103,11 +103,11 @@ export class MarketplaceOffersService { /** * Get all valid offers * Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, or been accepted. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param offeror has offers from this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response @@ -195,7 +195,7 @@ export class MarketplaceOffersService { * Get offer * Get details about an offer. * @param offerId The ID of the offer to get information about. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -273,7 +273,7 @@ export class MarketplaceOffersService { /** * Get total count * Get the total number of offers on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError @@ -302,14 +302,14 @@ export class MarketplaceOffersService { /** * Make offer * Make an offer on a token. A valid listing is not required. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -348,6 +348,10 @@ export class MarketplaceOffersService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -409,14 +413,14 @@ export class MarketplaceOffersService { /** * Cancel offer * Cancel a valid offer made by the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -435,6 +439,10 @@ export class MarketplaceOffersService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ @@ -496,14 +504,14 @@ export class MarketplaceOffersService { /** * Accept offer * Accept a valid offer. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError @@ -522,6 +530,10 @@ export class MarketplaceOffersService { * Gas limit for the transaction */ gas?: string; + /** + * Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions. + */ + gasPrice?: string; /** * Maximum fee per gas */ diff --git a/sdk/src/services/RelayerService.ts b/sdk/src/services/RelayerService.ts index 46965f4a4..fd365786f 100644 --- a/sdk/src/services/RelayerService.ts +++ b/sdk/src/services/RelayerService.ts @@ -49,6 +49,9 @@ export class RelayerService { public create( requestBody: { name?: string; + /** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ chain: string; /** * The address of the backend wallet to use for relaying transactions. @@ -115,6 +118,9 @@ export class RelayerService { requestBody: { id: string; name?: string; + /** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ chain?: string; /** * A contract or wallet address diff --git a/sdk/src/services/TransactionService.ts b/sdk/src/services/TransactionService.ts index 863cd47c5..a10a731d2 100644 --- a/sdk/src/services/TransactionService.ts +++ b/sdk/src/services/TransactionService.ts @@ -384,7 +384,7 @@ export class TransactionService { /** * Send a signed transaction * Send a signed transaction - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param requestBody * @returns any Default Response * @throws ApiError @@ -421,7 +421,7 @@ export class TransactionService { /** * Send a signed user operation * Send a signed user operation - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param requestBody * @returns any Default Response * @throws ApiError @@ -462,14 +462,14 @@ export class TransactionService { /** * Get transaction receipt * Get the transaction receipt from a transaction hash. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param transactionHash Transaction hash - * @param chain Chain ID or name * @returns any Default Response * @throws ApiError */ public getTransactionReceipt( - transactionHash: string, chain: string, + transactionHash: string, ): CancelablePromise<{ result: ({ to?: string; @@ -498,8 +498,8 @@ export class TransactionService { method: 'GET', url: '/transaction/{chain}/tx-hash/{transactionHash}', path: { - 'transactionHash': transactionHash, 'chain': chain, + 'transactionHash': transactionHash, }, errors: { 400: `Bad Request`, @@ -512,14 +512,14 @@ export class TransactionService { /** * Get transaction receipt from user-op hash * Get the transaction receipt from a user-op hash. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param userOpHash User operation hash - * @param chain Chain ID or name * @returns any Default Response * @throws ApiError */ public useropHashReceipt( - userOpHash: string, chain: string, + userOpHash: string, ): CancelablePromise<{ result: any; }> { @@ -527,8 +527,8 @@ export class TransactionService { method: 'GET', url: '/transaction/{chain}/userop-hash/{userOpHash}', path: { - 'userOpHash': userOpHash, 'chain': chain, + 'userOpHash': userOpHash, }, errors: { 400: `Bad Request`, @@ -541,7 +541,7 @@ export class TransactionService { /** * Get transaction logs * Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to parse the event logs. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param queueId The queue ID for a mined transaction. * @param transactionHash The transaction hash for a mined transaction. * @param parseLogs If true, parse the raw logs as events defined in the contract ABI. (Default: true) diff --git a/sdk/src/services/WebhooksService.ts b/sdk/src/services/WebhooksService.ts index 9411e4e44..88604c53b 100644 --- a/sdk/src/services/WebhooksService.ts +++ b/sdk/src/services/WebhooksService.ts @@ -17,13 +17,13 @@ export class WebhooksService { */ public getAll(): CancelablePromise<{ result: Array<{ + id: number; url: string; name: (string | null); secret?: string; eventType: string; active: boolean; createdAt: string; - id: number; }>; }> { return this.httpRequest.request({ @@ -39,7 +39,7 @@ export class WebhooksService { /** * Create a webhook - * Create a webhook to call when certain blockchain events occur. + * Create a webhook to call when a specific Engine event occurs. * @param requestBody * @returns any Default Response * @throws ApiError @@ -47,7 +47,7 @@ export class WebhooksService { public create( requestBody: { /** - * Webhook URL + * Webhook URL. Non-HTTPS URLs are not supported. */ url: string; name?: string; @@ -55,13 +55,13 @@ export class WebhooksService { }, ): CancelablePromise<{ result: { + id: number; url: string; name: (string | null); secret?: string; eventType: string; active: boolean; createdAt: string; - id: number; }; }> { return this.httpRequest.request({ @@ -126,4 +126,34 @@ export class WebhooksService { }); } + /** + * Test webhook + * Send a test payload to a webhook. + * @param webhookId + * @returns any Default Response + * @throws ApiError + */ + public testWebhook( + webhookId: string, + ): CancelablePromise<{ + result: { + ok: boolean; + status: number; + body: string; + }; + }> { + return this.httpRequest.request({ + method: 'POST', + url: '/webhooks/{webhookId}/test', + path: { + 'webhookId': webhookId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + } diff --git a/src/server/listeners/update-tx-listener.ts b/src/server/listeners/update-tx-listener.ts index 150a41650..d871d0000 100644 --- a/src/server/listeners/update-tx-listener.ts +++ b/src/server/listeners/update-tx-listener.ts @@ -12,11 +12,11 @@ export const updateTxListener = async (): Promise => { logger({ service: "server", level: "info", - message: `Listening for updated transactions`, + message: "Listening for updated transactions", }); const connection = await knex.client.acquireConnection(); - connection.query(`LISTEN updated_transaction_data`); + connection.query("LISTEN updated_transaction_data"); connection.on( "notification", @@ -28,7 +28,7 @@ export const updateTxListener = async (): Promise => { (sub) => sub.requestId === parsedPayload.id, ); - if (index == -1) { + if (index === -1) { return; } @@ -55,7 +55,7 @@ export const updateTxListener = async (): Promise => { logger({ service: "server", level: "info", - message: `[updateTxListener] Connection database ended`, + message: "[updateTxListener] Connection database ended", }); knex.client.releaseConnection(connection); @@ -64,7 +64,7 @@ export const updateTxListener = async (): Promise => { logger({ service: "server", level: "info", - message: `[updateTxListener] Released database connection on end`, + message: "[updateTxListener] Released database connection on end", }); }); @@ -72,7 +72,7 @@ export const updateTxListener = async (): Promise => { logger({ service: "server", level: "error", - message: `[updateTxListener] Database connection error`, + message: "[updateTxListener] Database connection error", error: err, }); @@ -82,7 +82,7 @@ export const updateTxListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `[updateTxListener] Released database connection on error`, + message: "[updateTxListener] Released database connection on error", }); }); }; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 79690e376..99df90131 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -123,7 +123,7 @@ export async function withAuth(server: FastifyInstance) { } // Allow this request to proceed. return; - } else if (error) { + }if (error) { message = error; } } catch (err: any) { @@ -172,11 +172,10 @@ export const onRequest = async ({ const authWallet = await getAuthWallet(); if (publicKey === (await authWallet.getAddress())) { return await handleAccessToken(jwt, req, getUser); - } else if (publicKey === THIRDWEB_DASHBOARD_ISSUER) { + }if (publicKey === THIRDWEB_DASHBOARD_ISSUER) { return await handleDashboardAuth(jwt); - } else { - return await handleKeypairAuth({ jwt, req, publicKey }); } + return await handleKeypairAuth({ jwt, req, publicKey }); } // Get the public key hash from the `kid` header. @@ -383,7 +382,7 @@ const handleAccessToken = async ( try { token = await getAccessToken({ jwt }); - } catch (e) { + } catch (_e) { // Missing or invalid signature. This will occur if the JWT not intended for this auth pattern. return { isAuthed: false }; } diff --git a/src/server/middleware/error.ts b/src/server/middleware/error.ts index f993750f9..3957f2758 100644 --- a/src/server/middleware/error.ts +++ b/src/server/middleware/error.ts @@ -53,7 +53,7 @@ const isZodError = (err: unknown): boolean => { export function withErrorHandler(server: FastifyInstance) { server.setErrorHandler( - (error: string | Error | CustomError | ZodError, request, reply) => { + (error: string | Error | CustomError | ZodError, _request, reply) => { if (typeof error === "string") { return reply.status(StatusCodes.INTERNAL_SERVER_ERROR).send({ error: { diff --git a/src/server/routes/auth/access-tokens/get-all.ts b/src/server/routes/auth/access-tokens/get-all.ts index d1a274833..f71adc643 100644 --- a/src/server/routes/auth/access-tokens/get-all.ts +++ b/src/server/routes/auth/access-tokens/get-all.ts @@ -34,7 +34,7 @@ export async function getAllAccessTokens(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const accessTokens = await getAccessTokens(); res.status(StatusCodes.OK).send({ result: accessTokens.map((token) => ({ diff --git a/src/server/routes/auth/keypair/list.ts b/src/server/routes/auth/keypair/list.ts index b5df85979..ca6bb6698 100644 --- a/src/server/routes/auth/keypair/list.ts +++ b/src/server/routes/auth/keypair/list.ts @@ -28,7 +28,7 @@ export async function listPublicKeys(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const keypairs = await listKeypairs(); res.status(StatusCodes.OK).send({ diff --git a/src/server/routes/auth/permissions/get-all.ts b/src/server/routes/auth/permissions/get-all.ts index 737c195f6..2d8cab721 100644 --- a/src/server/routes/auth/permissions/get-all.ts +++ b/src/server/routes/auth/permissions/get-all.ts @@ -31,7 +31,7 @@ export async function getAllPermissions(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const permissions = await prisma.permissions.findMany(); res.status(StatusCodes.OK).send({ result: permissions, diff --git a/src/server/routes/backend-wallet/get-balance.ts b/src/server/routes/backend-wallet/get-balance.ts index 609d6a744..e569e96df 100644 --- a/src/server/routes/backend-wallet/get-balance.ts +++ b/src/server/routes/backend-wallet/get-balance.ts @@ -51,7 +51,7 @@ export async function getBalance(fastify: FastifyInstance) { const chainId = await getChainIdFromChain(chain); const sdk = await getSdk({ chainId }); - let balanceData = await sdk.getBalance(walletAddress); + const balanceData = await sdk.getBalance(walletAddress); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/backend-wallet/simulate-transaction.ts b/src/server/routes/backend-wallet/simulate-transaction.ts index cffec3f82..ece15a242 100644 --- a/src/server/routes/backend-wallet/simulate-transaction.ts +++ b/src/server/routes/backend-wallet/simulate-transaction.ts @@ -86,7 +86,7 @@ export async function simulateTransaction(fastify: FastifyInstance) { const chainId = await getChainIdFromChain(chain); - let queuedTransaction: QueuedTransaction = { + const queuedTransaction: QueuedTransaction = { status: "queued", queueId: randomUUID(), queuedAt: new Date(), diff --git a/src/server/routes/chain/get-all.ts b/src/server/routes/chain/get-all.ts index c508739d7..ae716658b 100644 --- a/src/server/routes/chain/get-all.ts +++ b/src/server/routes/chain/get-all.ts @@ -63,7 +63,7 @@ export async function getAllChainData(fastify: FastifyInstance) { [StatusCodes.OK]: responseSchema, }, }, - handler: async (request, reply) => { + handler: async (_request, reply) => { const allChains = (await fetchChains()) ?? []; const config = await getConfig(); diff --git a/src/server/routes/configuration/auth/get.ts b/src/server/routes/configuration/auth/get.ts index 29c174b4f..0b97d971e 100644 --- a/src/server/routes/configuration/auth/get.ts +++ b/src/server/routes/configuration/auth/get.ts @@ -26,7 +26,7 @@ export async function getAuthConfiguration(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const config = await getConfig(); res.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/configuration/backend-wallet-balance/get.ts b/src/server/routes/configuration/backend-wallet-balance/get.ts index c547b40a5..59aa13d51 100644 --- a/src/server/routes/configuration/backend-wallet-balance/get.ts +++ b/src/server/routes/configuration/backend-wallet-balance/get.ts @@ -30,7 +30,7 @@ export async function getBackendWalletBalanceConfiguration( [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const config = await getConfig(); res.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/configuration/cache/get.ts b/src/server/routes/configuration/cache/get.ts index 986decc8a..9f55c7114 100644 --- a/src/server/routes/configuration/cache/get.ts +++ b/src/server/routes/configuration/cache/get.ts @@ -26,7 +26,7 @@ export async function getCacheConfiguration(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const config = await getConfig(); res.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/configuration/chains/get.ts b/src/server/routes/configuration/chains/get.ts index 1c39b7827..9c0226bdf 100644 --- a/src/server/routes/configuration/chains/get.ts +++ b/src/server/routes/configuration/chains/get.ts @@ -25,7 +25,7 @@ export async function getChainsConfiguration(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const config = await getConfig(); const result: Static[] = config.chainOverrides ? JSON.parse(config.chainOverrides) diff --git a/src/server/routes/configuration/contract-subscriptions/get.ts b/src/server/routes/configuration/contract-subscriptions/get.ts index b80669d37..624e08084 100644 --- a/src/server/routes/configuration/contract-subscriptions/get.ts +++ b/src/server/routes/configuration/contract-subscriptions/get.ts @@ -29,7 +29,7 @@ export async function getContractSubscriptionsConfiguration( [StatusCodes.OK]: responseSchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const config = await getConfig(); res.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index 818d81ac3..e8a0d6a3d 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -47,11 +47,11 @@ export async function addUrlToCorsConfiguration(fastify: FastifyInstance) { const requiredUrls = mandatoryAllowedCorsUrls; - requiredUrls.forEach((url) => { + for (const url of requiredUrls) { if (!urlsToAdd.includes(url)) { urlsToAdd.push(url); } - }); + } await updateConfiguration({ accessControlAllowOrigin: [ diff --git a/src/server/routes/configuration/cors/get.ts b/src/server/routes/configuration/cors/get.ts index fef2c9834..0dc380626 100644 --- a/src/server/routes/configuration/cors/get.ts +++ b/src/server/routes/configuration/cors/get.ts @@ -25,7 +25,7 @@ export async function getCorsConfiguration(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const config = await getConfig(false); // Omit required domains. diff --git a/src/server/routes/configuration/ip/get.ts b/src/server/routes/configuration/ip/get.ts index de3d71c58..2e8a3a2f4 100644 --- a/src/server/routes/configuration/ip/get.ts +++ b/src/server/routes/configuration/ip/get.ts @@ -24,7 +24,7 @@ export async function getIpAllowlist(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const config = await getConfig(false); res.status(StatusCodes.OK).send({ diff --git a/src/server/routes/configuration/transactions/get.ts b/src/server/routes/configuration/transactions/get.ts index 9e40d0479..e86533968 100644 --- a/src/server/routes/configuration/transactions/get.ts +++ b/src/server/routes/configuration/transactions/get.ts @@ -35,7 +35,7 @@ export async function getTransactionConfiguration(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const config = await getConfig(); res.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/contract/events/get-all-events.ts b/src/server/routes/contract/events/get-all-events.ts index 240bc0f55..d8777a32d 100644 --- a/src/server/routes/contract/events/get-all-events.ts +++ b/src/server/routes/contract/events/get-all-events.ts @@ -87,7 +87,7 @@ export async function getAllEvents(fastify: FastifyInstance) { contractAddress, }); - let returnData = await contract.events.getAllEvents({ + const returnData = await contract.events.getAllEvents({ fromBlock, toBlock, order, diff --git a/src/server/routes/contract/events/get-contract-event-logs.ts b/src/server/routes/contract/events/get-contract-event-logs.ts index afba2f28f..84248fd68 100644 --- a/src/server/routes/contract/events/get-contract-event-logs.ts +++ b/src/server/routes/contract/events/get-contract-event-logs.ts @@ -145,11 +145,11 @@ export async function getContractEventLogs(fastify: FastifyInstance) { const logs = resultLogs.map((log) => { const topics: string[] = []; - [log.topic0, log.topic1, log.topic2, log.topic3].forEach((val) => { + for (const val of [ log.topic0, log.topic1, log.topic2, log.topic3 ]) { if (val) { topics.push(val); } - }); + } return { chainId: Number.parseInt(log.chainId), diff --git a/src/server/routes/contract/events/get-event-logs-by-timestamp.ts b/src/server/routes/contract/events/get-event-logs-by-timestamp.ts index 9c8ebb57c..5844410e9 100644 --- a/src/server/routes/contract/events/get-event-logs-by-timestamp.ts +++ b/src/server/routes/contract/events/get-event-logs-by-timestamp.ts @@ -94,11 +94,11 @@ export async function getEventLogs(fastify: FastifyInstance) { const logs = resultLogs.map((log) => { const topics: string[] = []; - [log.topic0, log.topic1, log.topic2, log.topic3].forEach((val) => { + for (const val of [ log.topic0, log.topic1, log.topic2, log.topic3 ]) { if (val) { topics.push(val); } - }); + } return { chainId: Number.parseInt(log.chainId), diff --git a/src/server/routes/contract/extensions/account-factory/index.ts b/src/server/routes/contract/extensions/account-factory/index.ts index dae7263fc..5934ba12a 100644 --- a/src/server/routes/contract/extensions/account-factory/index.ts +++ b/src/server/routes/contract/extensions/account-factory/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { getAllAccounts } from "./read/get-all-accounts"; import { getAssociatedAccounts } from "./read/get-associated-accounts"; import { isAccountDeployed } from "./read/is-account-deployed"; diff --git a/src/server/routes/contract/extensions/account/index.ts b/src/server/routes/contract/extensions/account/index.ts index fc5ed960d..c50ac0855 100644 --- a/src/server/routes/contract/extensions/account/index.ts +++ b/src/server/routes/contract/extensions/account/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { getAllAdmins } from "./read/get-all-admins"; import { getAllSessions } from "./read/get-all-sessions"; import { grantAdmin } from "./write/grant-admin"; diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index 1a89be573..25407cf2b 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -84,7 +84,7 @@ export async function getABI(fastify: FastifyInstance) { contractAddress, }); - let returnData = contract.abi; + const returnData = contract.abi; reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/metadata/events.ts b/src/server/routes/contract/metadata/events.ts index 65183b070..2292be868 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -84,7 +84,7 @@ export async function extractEvents(fastify: FastifyInstance) { contractAddress, }); - let returnData = await contract.publishedMetadata.extractEvents(); + const returnData = await contract.publishedMetadata.extractEvents(); reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/metadata/extensions.ts b/src/server/routes/contract/metadata/extensions.ts index 91937dd74..99da1ebc4 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -64,7 +64,7 @@ export async function getContractExtensions(fastify: FastifyInstance) { contractAddress, }); - let returnData = getAllDetectedExtensionNames(contract.abi); + const returnData = getAllDetectedExtensionNames(contract.abi); reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/metadata/functions.ts b/src/server/routes/contract/metadata/functions.ts index 59dd6356a..073d10d90 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -81,7 +81,7 @@ export async function extractFunctions(fastify: FastifyInstance) { contractAddress, }); - let returnData = await contract.publishedMetadata.extractFunctions(); + const returnData = await contract.publishedMetadata.extractFunctions(); reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/roles/read/get-all.ts b/src/server/routes/contract/roles/read/get-all.ts index feb579acb..adfeca05f 100644 --- a/src/server/routes/contract/roles/read/get-all.ts +++ b/src/server/routes/contract/roles/read/get-all.ts @@ -62,7 +62,7 @@ export async function getAllRoles(fastify: FastifyInstance) { contractAddress, }); - let returnData = (await contract.roles.getAll()) as Static< + const returnData = (await contract.roles.getAll()) as Static< typeof responseSchema >["result"]; diff --git a/src/server/routes/contract/roles/read/get.ts b/src/server/routes/contract/roles/read/get.ts index 398686032..983c5b698 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -56,7 +56,7 @@ export async function getRoles(fastify: FastifyInstance) { contractAddress, }); - let returnData = await contract.roles.get(role); + const returnData = await contract.roles.get(role); reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/subscriptions/add-contract-subscription.ts b/src/server/routes/contract/subscriptions/add-contract-subscription.ts index c890b2479..57545eda0 100644 --- a/src/server/routes/contract/subscriptions/add-contract-subscription.ts +++ b/src/server/routes/contract/subscriptions/add-contract-subscription.ts @@ -132,7 +132,7 @@ export async function addContractSubscription(fastify: FastifyInstance) { const provider = sdk.getProvider(); const currentBlockNumber = await provider.getBlockNumber(); await upsertChainIndexer({ chainId, currentBlockNumber }); - } catch (error) { + } catch (_error) { // this is fine, must be already locked, so don't need to update current block as this will be recent } } diff --git a/src/server/routes/contract/subscriptions/get-contract-subscriptions.ts b/src/server/routes/contract/subscriptions/get-contract-subscriptions.ts index 562097770..747aa5870 100644 --- a/src/server/routes/contract/subscriptions/get-contract-subscriptions.ts +++ b/src/server/routes/contract/subscriptions/get-contract-subscriptions.ts @@ -40,7 +40,7 @@ export async function getContractSubscriptions(fastify: FastifyInstance) { [StatusCodes.OK]: responseSchema, }, }, - handler: async (request, reply) => { + handler: async (_request, reply) => { const contractSubscriptions = await getAllContractSubscriptions(); reply.status(StatusCodes.OK).send({ diff --git a/src/server/routes/deploy/contract-types.ts b/src/server/routes/deploy/contract-types.ts index 7944aa585..b9f671bf9 100644 --- a/src/server/routes/deploy/contract-types.ts +++ b/src/server/routes/deploy/contract-types.ts @@ -1,6 +1,6 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { PREBUILT_CONTRACTS_MAP } from "@thirdweb-dev/sdk"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { standardResponseSchema } from "../../schemas/shared-api-schemas"; @@ -25,7 +25,7 @@ export async function contractTypes(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (request, reply) => { + handler: async (_request, reply) => { reply.status(StatusCodes.OK).send({ result: Object.keys(PREBUILT_CONTRACTS_MAP), }); diff --git a/src/server/routes/deploy/index.ts b/src/server/routes/deploy/index.ts index 7815ec974..641d894db 100644 --- a/src/server/routes/deploy/index.ts +++ b/src/server/routes/deploy/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { deployPrebuiltEdition } from "./prebuilts/edition"; import { deployPrebuiltEditionDrop } from "./prebuilts/edition-drop"; import { deployPrebuiltMarketplaceV3 } from "./prebuilts/marketplace-v3"; diff --git a/src/server/routes/deploy/prebuilt.ts b/src/server/routes/deploy/prebuilt.ts index 00b159b47..883768b6d 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.ts @@ -29,7 +29,7 @@ const requestBodySchema = Type.Object({ requestBodySchema.examples = [ { contractMetadata: { - name: `My Contract`, + name: "My Contract", description: "Contract deployed from thirdweb Engine", primary_sale_recipient: "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", seller_fee_basis_points: 500, diff --git a/src/server/routes/relayer/get-all.ts b/src/server/routes/relayer/get-all.ts index 59ce734b7..8311f3464 100644 --- a/src/server/routes/relayer/get-all.ts +++ b/src/server/routes/relayer/get-all.ts @@ -32,7 +32,7 @@ export async function getAllRelayers(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const relayers = await prisma.relayers.findMany(); return res.status(StatusCodes.OK).send({ diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index c93e22077..2f5883768 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -157,7 +157,7 @@ export async function relayTransaction(fastify: FastifyInstance) { }, }); return; - } else if (req.body.type === "permit") { + }if (req.body.type === "permit") { // EIP-2612 const { request, signature } = req.body; const { v, r, s } = utils.splitSignature(signature); diff --git a/src/server/routes/system/queue.ts b/src/server/routes/system/queue.ts index 38b1c52e4..54b3adf58 100644 --- a/src/server/routes/system/queue.ts +++ b/src/server/routes/system/queue.ts @@ -42,7 +42,7 @@ export async function queueStatus(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { // Get # queued and sent transactions. const queued = await SendTransactionQueue.length(); const pending = await MineTransactionQueue.length(); diff --git a/src/server/routes/transaction/blockchain/get-user-op-receipt.ts b/src/server/routes/transaction/blockchain/get-user-op-receipt.ts index 8851a252a..cee358858 100644 --- a/src/server/routes/transaction/blockchain/get-user-op-receipt.ts +++ b/src/server/routes/transaction/blockchain/get-user-op-receipt.ts @@ -104,7 +104,7 @@ export async function getUserOpReceipt(fastify: FastifyInstance) { reply.status(StatusCodes.OK).send({ result: json.result, }); - } catch (e) { + } catch (_e) { throw createCustomError( "Unable to get receipt.", StatusCodes.INTERNAL_SERVER_ERROR, diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index 9db14dd39..866e207eb 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -80,7 +80,7 @@ export async function cancelTransaction(fastify: FastifyInstance) { ); } - let message = "Transaction successfully cancelled."; + const message = "Transaction successfully cancelled."; let cancelledTransaction: CancelledTransaction | null = null; if (!transaction.isUserOp) { if (transaction.status === "queued") { diff --git a/src/server/routes/transaction/status.ts b/src/server/routes/transaction/status.ts index d597de3df..60dcb18ba 100644 --- a/src/server/routes/transaction/status.ts +++ b/src/server/routes/transaction/status.ts @@ -125,7 +125,7 @@ export async function checkTxStatus(fastify: FastifyInstance) { onError(error, connection, request); }); - connection.socket.on("message", async (message, isBinary) => { + connection.socket.on("message", async (_message, _isBinary) => { onMessage(connection, request); }); diff --git a/src/server/routes/webhooks/events.ts b/src/server/routes/webhooks/events.ts index 4ad95e28a..05feda3a1 100644 --- a/src/server/routes/webhooks/events.ts +++ b/src/server/routes/webhooks/events.ts @@ -24,7 +24,7 @@ export async function getWebhooksEventTypes(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const eventTypesArray = Object.values(WebhooksEventTypes); res.status(StatusCodes.OK).send({ result: eventTypesArray, diff --git a/src/server/routes/webhooks/get-all.ts b/src/server/routes/webhooks/get-all.ts index a30a56194..a77db4c57 100644 --- a/src/server/routes/webhooks/get-all.ts +++ b/src/server/routes/webhooks/get-all.ts @@ -25,7 +25,7 @@ export async function getAllWebhooksData(fastify: FastifyInstance) { [StatusCodes.OK]: responseBodySchema, }, }, - handler: async (req, res) => { + handler: async (_req, res) => { const webhooks = await getAllWebhooks(); res.status(StatusCodes.OK).send({ diff --git a/src/server/schemas/erc20/index.ts b/src/server/schemas/erc20/index.ts index 76a2a98db..1b8df828d 100644 --- a/src/server/schemas/erc20/index.ts +++ b/src/server/schemas/erc20/index.ts @@ -1,4 +1,4 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema } from "../address"; export const erc20MetadataSchema = Type.Object({ diff --git a/src/server/schemas/event-log.ts b/src/server/schemas/event-log.ts index bf3f6a9d8..eb30b668d 100644 --- a/src/server/schemas/event-log.ts +++ b/src/server/schemas/event-log.ts @@ -20,11 +20,11 @@ export const toEventLogSchema = ( log: ContractEventLogs, ): Static => { const topics: string[] = []; - [log.topic0, log.topic1, log.topic2, log.topic3].forEach((val) => { + for (const val of [ log.topic0, log.topic1, log.topic2, log.topic3 ]) { if (val) { topics.push(val); } - }); + } return { chainId: Number.parseInt(log.chainId), diff --git a/src/server/schemas/nft/index.ts b/src/server/schemas/nft/index.ts index 31ae133b7..f1d646bce 100644 --- a/src/server/schemas/nft/index.ts +++ b/src/server/schemas/nft/index.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { BigNumber } from "ethers"; +import { type Static, Type } from "@sinclair/typebox"; +import type { BigNumber } from "ethers"; import { AddressSchema } from "../address"; import { NumberStringSchema } from "../number"; diff --git a/src/server/schemas/websocket/index.ts b/src/server/schemas/websocket/index.ts index a1168fc07..77b68f082 100644 --- a/src/server/schemas/websocket/index.ts +++ b/src/server/schemas/websocket/index.ts @@ -1,5 +1,5 @@ // types.ts -import { WebSocket } from "ws"; +import type { WebSocket } from "ws"; export interface UserSubscription { socket: WebSocket; diff --git a/src/server/utils/marketplace-v3.ts b/src/server/utils/marketplace-v3.ts index b880c9e4c..9b9560cce 100644 --- a/src/server/utils/marketplace-v3.ts +++ b/src/server/utils/marketplace-v3.ts @@ -1,4 +1,4 @@ -import { DirectListingV3, EnglishAuction, OfferV3 } from "@thirdweb-dev/sdk"; +import type { DirectListingV3, EnglishAuction, OfferV3 } from "@thirdweb-dev/sdk"; export const formatDirectListingV3Result = (listing: DirectListingV3) => { return { diff --git a/src/server/utils/openapi.ts b/src/server/utils/openapi.ts index 6b6e1b06f..3dd14ea76 100644 --- a/src/server/utils/openapi.ts +++ b/src/server/utils/openapi.ts @@ -1,5 +1,5 @@ -import { FastifyInstance } from "fastify"; -import fs from "fs"; +import type { FastifyInstance } from "fastify"; +import fs from "node:fs"; export const writeOpenApiToFile = (server: FastifyInstance) => { try { diff --git a/src/server/utils/validator.ts b/src/server/utils/validator.ts index cde9192b2..a72f4b5da 100644 --- a/src/server/utils/validator.ts +++ b/src/server/utils/validator.ts @@ -11,15 +11,16 @@ import type { } from "../schemas/nft"; const timestampValidator = (value: number | string | undefined): boolean => { - if (value === undefined) { + let timestamp = value; + if (timestamp === undefined) { return true; } - if (!Number.isNaN(Number(value))) { - value = Number(value); + if (!Number.isNaN(Number(timestamp))) { + timestamp = Number(timestamp); } - return new Date(value).getTime() > 0; + return new Date(timestamp).getTime() > 0; }; export const checkAndReturnERC20SignaturePayload = < diff --git a/src/server/utils/websocket.ts b/src/server/utils/websocket.ts index b18f1dd13..e01f00715 100644 --- a/src/server/utils/websocket.ts +++ b/src/server/utils/websocket.ts @@ -10,7 +10,7 @@ const timeoutDuration = 10 * 60 * 1000; export const findWSConnectionInSharedState = async ( connection: SocketStream, - request: FastifyRequest, + _request: FastifyRequest, ): Promise => { const index = subscriptionsData.findIndex( (sub) => sub.socket === connection.socket, @@ -23,7 +23,7 @@ export const removeWSFromSharedState = async ( request: FastifyRequest, ): Promise => { const index = await findWSConnectionInSharedState(connection, request); - if (index == -1) { + if (index === -1) { return -1; } subscriptionsData.splice(index, 1); @@ -38,12 +38,12 @@ export const onError = async ( logger({ service: "server", level: "error", - message: `Websocket error`, + message: "Websocket error", error, }); const index = await findWSConnectionInSharedState(connection, request); - if (index == -1) { + if (index === -1) { return; } @@ -84,7 +84,7 @@ export const onClose = async ( request: FastifyRequest, ): Promise => { const index = await findWSConnectionInSharedState(connection, request); - if (index == -1) { + if (index === -1) { return; } subscriptionsData.splice(index, 1); @@ -140,7 +140,7 @@ export const getStatusMessageAndConnectionStatus = async ( let closeConnection = false; if (!data) { - message = `Transaction not found. Make sure the provided ID is correct.`; + message = "Transaction not found. Make sure the provided ID is correct."; closeConnection = true; } else if (data.status === "mined") { message = "Transaction mined. Closing connection."; diff --git a/src/shared/db/contract-transaction-receipts/create-contract-transaction-receipts.ts b/src/shared/db/contract-transaction-receipts/create-contract-transaction-receipts.ts index ac3396516..a8843b0fc 100644 --- a/src/shared/db/contract-transaction-receipts/create-contract-transaction-receipts.ts +++ b/src/shared/db/contract-transaction-receipts/create-contract-transaction-receipts.ts @@ -1,5 +1,5 @@ -import { ContractTransactionReceipts, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schemas/prisma"; +import type { ContractTransactionReceipts, Prisma } from "@prisma/client"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/shared/db/keypair/delete.ts b/src/shared/db/keypair/delete.ts index 08fd6529c..f731594fb 100644 --- a/src/shared/db/keypair/delete.ts +++ b/src/shared/db/keypair/delete.ts @@ -1,4 +1,4 @@ -import { Keypairs } from "@prisma/client"; +import type { Keypairs } from "@prisma/client"; import { prisma } from "../client"; export const deleteKeypair = async ({ diff --git a/src/shared/db/keypair/get.ts b/src/shared/db/keypair/get.ts index 37e1cf00d..bc4b4997a 100644 --- a/src/shared/db/keypair/get.ts +++ b/src/shared/db/keypair/get.ts @@ -1,4 +1,4 @@ -import { Keypairs } from "@prisma/client"; +import type { Keypairs } from "@prisma/client"; import { createHash } from "crypto"; import { prisma } from "../client"; diff --git a/src/shared/db/keypair/list.ts b/src/shared/db/keypair/list.ts index cc08bbda8..0bf1dc494 100644 --- a/src/shared/db/keypair/list.ts +++ b/src/shared/db/keypair/list.ts @@ -1,4 +1,4 @@ -import { Keypairs } from "@prisma/client"; +import type { Keypairs } from "@prisma/client"; import { prisma } from "../client"; export const listKeypairs = async (): Promise => { diff --git a/src/shared/db/tokens/create-token.ts b/src/shared/db/tokens/create-token.ts index 235e00bb7..41c973155 100644 --- a/src/shared/db/tokens/create-token.ts +++ b/src/shared/db/tokens/create-token.ts @@ -16,7 +16,7 @@ export const createToken = async ({ return prisma.tokens.create({ data: { id: payload.jti, - tokenMask: jwt.slice(0, 10) + "..." + jwt.slice(-10), + tokenMask: `${jwt.slice(0, 10)}...${jwt.slice(-10)}`, walletAddress: payload.sub, expiresAt: new Date(payload.exp * 1000), isAccessToken, diff --git a/src/shared/db/transactions/db.ts b/src/shared/db/transactions/db.ts index c58dbea7b..3250e5cb2 100644 --- a/src/shared/db/transactions/db.ts +++ b/src/shared/db/transactions/db.ts @@ -33,10 +33,10 @@ import type { AnyTransaction } from "../../utils/transaction/types"; export class TransactionDB { private static transactionDetailsKey = (queueId: string) => `transaction:${queueId}`; - private static queuedTransactionsKey = `transaction:queued`; - private static minedTransactionsKey = `transaction:mined`; - private static cancelledTransactionsKey = `transaction:cancelled`; - private static erroredTransactionsKey = `transaction:errored`; + private static queuedTransactionsKey = "transaction:queued"; + private static minedTransactionsKey = "transaction:mined"; + private static cancelledTransactionsKey = "transaction:cancelled"; + private static erroredTransactionsKey = "transaction:errored"; /** * Inserts or replaces a transaction details. diff --git a/src/shared/db/wallets/delete-wallet-details.ts b/src/shared/db/wallets/delete-wallet-details.ts index 69e5fd3da..96aeb3860 100644 --- a/src/shared/db/wallets/delete-wallet-details.ts +++ b/src/shared/db/wallets/delete-wallet-details.ts @@ -1,4 +1,4 @@ -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { prisma } from "../client"; export const deleteWalletDetails = async (walletAddress: Address) => { diff --git a/src/shared/db/wallets/get-all-wallets.ts b/src/shared/db/wallets/get-all-wallets.ts index 5f0603e81..249ea2c1c 100644 --- a/src/shared/db/wallets/get-all-wallets.ts +++ b/src/shared/db/wallets/get-all-wallets.ts @@ -1,4 +1,4 @@ -import { PrismaTransaction } from "../../schemas/prisma"; +import type { PrismaTransaction } from "../../schemas/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetAllWalletsParams { diff --git a/src/shared/db/webhooks/create-webhook.ts b/src/shared/db/webhooks/create-webhook.ts index 7c32a5f13..0b3ebb151 100644 --- a/src/shared/db/webhooks/create-webhook.ts +++ b/src/shared/db/webhooks/create-webhook.ts @@ -1,6 +1,6 @@ -import { Webhooks } from "@prisma/client"; +import type { Webhooks } from "@prisma/client"; import { createHash, randomBytes } from "crypto"; -import { WebhooksEventTypes } from "../../schemas/webhooks"; +import type { WebhooksEventTypes } from "../../schemas/webhooks"; import { prisma } from "../client"; interface CreateWebhooksParams { diff --git a/src/shared/db/webhooks/get-all-webhooks.ts b/src/shared/db/webhooks/get-all-webhooks.ts index 85e93eefc..1f76e76c8 100644 --- a/src/shared/db/webhooks/get-all-webhooks.ts +++ b/src/shared/db/webhooks/get-all-webhooks.ts @@ -1,4 +1,4 @@ -import { Webhooks } from "@prisma/client"; +import type { Webhooks } from "@prisma/client"; import { prisma } from "../client"; export const getAllWebhooks = async (): Promise => { diff --git a/src/shared/schemas/prisma.ts b/src/shared/schemas/prisma.ts index abe01be4c..03c088379 100644 --- a/src/shared/schemas/prisma.ts +++ b/src/shared/schemas/prisma.ts @@ -1,5 +1,5 @@ import type { Prisma, PrismaClient } from "@prisma/client"; -import { DefaultArgs } from "@prisma/client/runtime/library"; +import type { DefaultArgs } from "@prisma/client/runtime/library"; export type PrismaTransaction = Omit< PrismaClient, diff --git a/src/shared/utils/block.ts b/src/shared/utils/block.ts index 9d7f61f20..36d6bfd0c 100644 --- a/src/shared/utils/block.ts +++ b/src/shared/utils/block.ts @@ -20,9 +20,9 @@ export const getBlockNumberish = async (chainId: number): Promise => { try { const blockNumber = await eth_blockNumber(rpcRequest); // Non-blocking update to cache. - redis.set(key, blockNumber.toString()).catch((e) => {}); + redis.set(key, blockNumber.toString()).catch((_e) => {}); return blockNumber; - } catch (e) { + } catch (_e) { const cached = await redis.get(key); if (cached) { return BigInt(cached); diff --git a/src/shared/utils/cache/clear-cache.ts b/src/shared/utils/cache/clear-cache.ts index 3a8cc423d..e70fa38be 100644 --- a/src/shared/utils/cache/clear-cache.ts +++ b/src/shared/utils/cache/clear-cache.ts @@ -7,7 +7,7 @@ import { webhookCache } from "./get-webhook"; import { keypairCache } from "./keypair"; export const clearCache = async ( - service: (typeof env)["LOG_SERVICES"][0], + _service: (typeof env)["LOG_SERVICES"][0], ): Promise => { invalidateConfig(); webhookCache.clear(); diff --git a/src/shared/utils/cron/clear-cache-cron.ts b/src/shared/utils/cron/clear-cache-cron.ts index 71c620862..6fed64673 100644 --- a/src/shared/utils/cron/clear-cache-cron.ts +++ b/src/shared/utils/cron/clear-cache-cron.ts @@ -1,7 +1,7 @@ import cron from "node-cron"; import { clearCache } from "../cache/clear-cache"; import { getConfig } from "../cache/get-config"; -import { env } from "../env"; +import type { env } from "../env"; let task: cron.ScheduledTask; export const clearCacheCron = async ( diff --git a/src/shared/utils/cron/is-valid-cron.ts b/src/shared/utils/cron/is-valid-cron.ts index 67ed4b462..7615fde8e 100644 --- a/src/shared/utils/cron/is-valid-cron.ts +++ b/src/shared/utils/cron/is-valid-cron.ts @@ -5,7 +5,7 @@ import { createCustomError } from "../../../server/middleware/error"; export const isValidCron = (input: string): boolean => { try { cronParser.parseExpression(input); - } catch (error) { + } catch (_error) { throw createCustomError( "Invalid cron expression. Please check the cron expression.", StatusCodes.BAD_REQUEST, diff --git a/src/shared/utils/crypto.ts b/src/shared/utils/crypto.ts index 7b9052dd4..4086d4a9e 100644 --- a/src/shared/utils/crypto.ts +++ b/src/shared/utils/crypto.ts @@ -14,7 +14,7 @@ export const isWellFormedPublicKey = (key: string) => { try { crypto.createPublicKey(key); return true; - } catch (e) { + } catch (_e) { return false; } }; diff --git a/src/shared/utils/logger.ts b/src/shared/utils/logger.ts index 120d06ac0..3b4372bf5 100644 --- a/src/shared/utils/logger.ts +++ b/src/shared/utils/logger.ts @@ -45,9 +45,8 @@ const filterErrorsAndFatal = format((info) => { const colorizeFormat = () => { if (env.NODE_ENV === "development") { return format.colorize({ colors: customLevels.colors }); - } else { - return format.uncolorize(); } + return format.uncolorize(); }; const winstonLogger = createLogger({ @@ -104,7 +103,7 @@ export const logger = ({ prefix += `[Transaction] [${queueId}] `; } - let suffix = ``; + let suffix = ""; if (data) { suffix += ` - ${JSON.stringify(data)}`; } diff --git a/src/shared/utils/transaction/cancel-transaction.ts b/src/shared/utils/transaction/cancel-transaction.ts index d2dda52c6..52d3f432d 100644 --- a/src/shared/utils/transaction/cancel-transaction.ts +++ b/src/shared/utils/transaction/cancel-transaction.ts @@ -1,4 +1,4 @@ -import { Address, toSerializableTransaction } from "thirdweb"; +import { type Address, toSerializableTransaction } from "thirdweb"; import { getAccount } from "../account"; import { getChain } from "../chain"; import { getChecksumAddress } from "../primitive-types"; diff --git a/src/shared/utils/usage.ts b/src/shared/utils/usage.ts index 957ac669a..64ec568e8 100644 --- a/src/shared/utils/usage.ts +++ b/src/shared/utils/usage.ts @@ -136,7 +136,7 @@ export const reportUsage = (usageEvents: ReportUsageParams[]) => { logger({ service: "worker", level: "error", - message: `Error:`, + message: "Error:", error: e, }); } diff --git a/src/shared/utils/webhook.ts b/src/shared/utils/webhook.ts index f8597e9ca..c31b3e1af 100644 --- a/src/shared/utils/webhook.ts +++ b/src/shared/utils/webhook.ts @@ -31,7 +31,7 @@ export const createWebhookRequestHeaders = async ( const timestamp = Math.floor(Date.now() / 1000).toString(); const signature = generateSignature(body, timestamp, webhook.secret); - headers["Authorization"] = `Bearer ${webhook.secret}`; + headers.Authorization = `Bearer ${webhook.secret}`; headers["x-engine-signature"] = signature; headers["x-engine-timestamp"] = timestamp; } diff --git a/src/worker/listeners/config-listener.ts b/src/worker/listeners/config-listener.ts index a52483bad..9168fe9fb 100644 --- a/src/worker/listeners/config-listener.ts +++ b/src/worker/listeners/config-listener.ts @@ -8,17 +8,17 @@ export const newConfigurationListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Listening for new configuration data`, + message: "Listening for new configuration data", }); // TODO: This doesn't even need to be a listener const connection = await knex.client.acquireConnection(); - connection.query(`LISTEN new_configuration_data`); + connection.query("LISTEN new_configuration_data"); // Whenever we receive a new transaction, process it connection.on( "notification", - async (msg: { channel: string; payload: string }) => { + async (_msg: { channel: string; payload: string }) => { // Update Configs Data await getConfig(false); }, @@ -31,7 +31,7 @@ export const newConfigurationListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Released database connection on end`, + message: "Released database connection on end", }); }); @@ -39,7 +39,7 @@ export const newConfigurationListener = async (): Promise => { logger({ service: "worker", level: "error", - message: `Database connection error`, + message: "Database connection error", error: err, }); @@ -49,7 +49,7 @@ export const newConfigurationListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Released database connection on error`, + message: "Released database connection on error", error: err, }); }); @@ -59,22 +59,22 @@ export const updatedConfigurationListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Listening for updated configuration data`, + message: "Listening for updated configuration data", }); // TODO: This doesn't even need to be a listener const connection = await knex.client.acquireConnection(); - connection.query(`LISTEN updated_configuration_data`); + connection.query("LISTEN updated_configuration_data"); // Whenever we receive a new transaction, process it connection.on( "notification", - async (msg: { channel: string; payload: string }) => { + async (_msg: { channel: string; payload: string }) => { // Update Configs Data logger({ service: "worker", level: "info", - message: `Updated configuration data`, + message: "Updated configuration data", }); await getConfig(false); await clearCacheCron("worker"); @@ -89,7 +89,7 @@ export const updatedConfigurationListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Released database connection on end`, + message: "Released database connection on end", }); }); @@ -97,7 +97,7 @@ export const updatedConfigurationListener = async (): Promise => { logger({ service: "worker", level: "error", - message: `Database connection error`, + message: "Database connection error", error: err, }); @@ -107,7 +107,7 @@ export const updatedConfigurationListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Released database connection on error`, + message: "Released database connection on error", error: err, }); }); diff --git a/src/worker/listeners/webhook-listener.ts b/src/worker/listeners/webhook-listener.ts index fd1197cb2..813100f8a 100644 --- a/src/worker/listeners/webhook-listener.ts +++ b/src/worker/listeners/webhook-listener.ts @@ -6,21 +6,21 @@ export const newWebhooksListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Listening for new webhooks data`, + message: "Listening for new webhooks data", }); // TODO: This doesn't even need to be a listener const connection = await knex.client.acquireConnection(); - connection.query(`LISTEN new_webhook_data`); + connection.query("LISTEN new_webhook_data"); // Whenever we receive a new transaction, process it connection.on( "notification", - async (msg: { channel: string; payload: string }) => { + async (_msg: { channel: string; payload: string }) => { logger({ service: "worker", level: "info", - message: `Received new webhooks data`, + message: "Received new webhooks data", }); // Update Webhooks Data webhookCache.clear(); @@ -34,7 +34,7 @@ export const newWebhooksListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Released database connection on end`, + message: "Released database connection on end", }); }); @@ -42,7 +42,7 @@ export const newWebhooksListener = async (): Promise => { logger({ service: "worker", level: "error", - message: `Database connection error`, + message: "Database connection error", error: err, }); @@ -52,7 +52,7 @@ export const newWebhooksListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Released database connection on error`, + message: "Released database connection on error", error: err, }); }); @@ -62,22 +62,22 @@ export const updatedWebhooksListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Listening for updated webhooks data`, + message: "Listening for updated webhooks data", }); // TODO: This doesn't even need to be a listener const connection = await knex.client.acquireConnection(); - connection.query(`LISTEN updated_webhook_data`); + connection.query("LISTEN updated_webhook_data"); // Whenever we receive a new transaction, process it connection.on( "notification", - async (msg: { channel: string; payload: string }) => { + async (_msg: { channel: string; payload: string }) => { // Update Configs Data logger({ service: "worker", level: "info", - message: `Received updated webhooks data`, + message: "Received updated webhooks data", }); webhookCache.clear(); }, @@ -90,7 +90,7 @@ export const updatedWebhooksListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Released database connection on end`, + message: "Released database connection on end", }); }); @@ -98,7 +98,7 @@ export const updatedWebhooksListener = async (): Promise => { logger({ service: "worker", level: "error", - message: `Database connection error`, + message: "Database connection error", error: err, }); @@ -108,7 +108,7 @@ export const updatedWebhooksListener = async (): Promise => { logger({ service: "worker", level: "info", - message: `Released database connection on error`, + message: "Released database connection on error", error: err, }); }); diff --git a/src/worker/queues/send-transaction-queue.ts b/src/worker/queues/send-transaction-queue.ts index 4f4db261b..0361da622 100644 --- a/src/worker/queues/send-transaction-queue.ts +++ b/src/worker/queues/send-transaction-queue.ts @@ -32,7 +32,7 @@ export class SendTransactionQueue { static remove = async (data: SendTransactionData) => { try { await this.q.remove(this.jobId(data)); - } catch (e) { + } catch (_e) { // Job is currently running. } }; diff --git a/src/worker/tasks/process-event-logs-worker.ts b/src/worker/tasks/process-event-logs-worker.ts index e4e43bfd2..b017b0a0c 100644 --- a/src/worker/tasks/process-event-logs-worker.ts +++ b/src/worker/tasks/process-event-logs-worker.ts @@ -261,7 +261,7 @@ const getBlockTimestamps = async ( try { const block = await eth_getBlockByHash(rpcRequest, { blockHash }); return new Date(Number(block.timestamp) * 1000); - } catch (e) { + } catch (_e) { return now; } }), From 788198964ae1db6f5de0e91f196de9f6f6202cf4 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Wed, 11 Dec 2024 18:51:09 -0600 Subject: [PATCH 42/44] bump sdk version (#813) --- sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/package.json b/sdk/package.json index 9abdaad57..cef4e1aa8 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@thirdweb-dev/engine", - "version": "0.0.16", + "version": "0.0.17", "main": "dist/thirdweb-dev-engine.cjs.js", "module": "dist/thirdweb-dev-engine.esm.js", "files": [ From 9a08a92223a2abe63604d327350941e5180a3c71 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Wed, 11 Dec 2024 22:02:31 -0600 Subject: [PATCH 43/44] update workflow action versions (#812) --- .github/workflows/build-image-tag.yml | 4 ++-- .github/workflows/build.yml | 4 ++-- .github/workflows/lint.yml | 6 +++--- .github/workflows/main.yml | 4 ++-- .github/workflows/npm-publish.yml | 4 ++-- .github/workflows/stale.yml | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-image-tag.yml b/.github/workflows/build-image-tag.yml index 8a6e8b28b..6fe1905d6 100644 --- a/.github/workflows/build-image-tag.yml +++ b/.github/workflows/build-image-tag.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.release.target_commitish }} @@ -86,4 +86,4 @@ jobs: - name: Inspect latest image (if applicable) if: ${{ env.LATEST_TAG != '' }} run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest \ No newline at end of file + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6281f2bcc..de1d50875 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,12 +7,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "18" cache: "yarn" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f08a3b590..c0fd0379f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,12 +7,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "18" cache: "yarn" @@ -21,4 +21,4 @@ jobs: run: yarn install - name: Run lint - run: yarn lint \ No newline at end of file + run: yarn lint diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16c6a5036..67ae85d7e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: arch: arm64 steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -67,4 +67,4 @@ jobs: - name: Inspect image run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:nightly \ No newline at end of file + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:nightly diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index ed192e23f..3f407a043 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,12 +8,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: "18" cache: "yarn" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index e39025edc..b886d0b34 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -18,7 +18,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v5 + - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: 'This PR is stale because it has been open for 7 days with no activity. Remove stale label or comment or this PR will be closed in 3 days.' From d982be9820d14e298e523ab7d7728818efbf4434 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Wed, 11 Dec 2024 22:45:16 -0600 Subject: [PATCH 44/44] fix all biome errors (#815) * bump yarn to berry * fix all biome errors * bring back pinned resolved deps, fix whitepsace --------- Co-authored-by: Phillip Ho --- .github/workflows/build-image-tag.yml | 4 +- .github/workflows/build.yml | 4 +- .github/workflows/lint.yml | 4 +- .github/workflows/main.yml | 4 +- .github/workflows/npm-publish.yml | 2 +- .github/workflows/stale.yml | 2 +- .yarnrc | 2 +- package.json | 3 +- src/polyfill.ts | 3 +- src/server/listeners/update-tx-listener.ts | 2 +- src/server/middleware/auth.ts | 2 +- src/server/middleware/error.ts | 12 +- .../routes/backend-wallet/sign-transaction.ts | 6 +- .../extensions/erc20/read/allowance-of.ts | 2 +- .../contract/extensions/erc20/read/get.ts | 4 +- .../blockchain/send-signed-user-op.ts | 5 +- src/server/utils/convertor.ts | 15 +- .../utils/wallets/get-aws-kms-account.ts | 2 +- .../utils/wallets/get-gcp-kms-account.ts | 2 +- src/shared/db/transactions/queue-tx.ts | 2 +- src/shared/lib/cache/swr.ts | 2 +- src/shared/utils/ethers.ts | 15 +- src/shared/utils/logger.ts | 6 +- .../simulate-queued-transaction.ts | 6 +- src/shared/utils/transaction/types.ts | 2 +- src/worker/listeners/config-listener.ts | 4 +- src/worker/listeners/webhook-listener.ts | 4 +- src/worker/queues/send-webhook-queue.ts | 7 - .../tasks/cancel-recycled-nonces-worker.ts | 2 +- src/worker/tasks/mine-transaction-worker.ts | 2 +- src/worker/tasks/nonce-resync-worker.ts | 2 +- src/worker/tasks/process-event-logs-worker.ts | 6 +- .../process-transaction-receipts-worker.ts | 2 +- src/worker/tasks/prune-transactions-worker.ts | 2 +- src/worker/tasks/send-webhook-worker.ts | 4 +- tests/e2e/config.ts | 2 +- tests/e2e/scripts/counter.ts | 6 +- tests/e2e/tests/extensions.test.ts | 6 +- tests/e2e/tests/load.test.ts | 4 +- tests/unit/auth.test.ts | 7 +- yarn.lock | 4718 +++++++---------- 41 files changed, 2028 insertions(+), 2863 deletions(-) diff --git a/.github/workflows/build-image-tag.yml b/.github/workflows/build-image-tag.yml index 6fe1905d6..fbf5d46e4 100644 --- a/.github/workflows/build-image-tag.yml +++ b/.github/workflows/build-image-tag.yml @@ -14,7 +14,7 @@ jobs: matrix: include: - platform: linux/amd64 - runner: ubuntu-latest + runner: ubuntu-24.04 arch: amd64 - platform: linux/arm64 runner: ubuntu-24.04-arm64 @@ -53,7 +53,7 @@ jobs: merge-manifests: needs: build - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: LATEST_TAG: ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' || '' }} steps: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de1d50875..c96789b9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: pull_request jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v4 @@ -16,7 +16,7 @@ jobs: with: node-version: "18" cache: "yarn" - + - name: Install dependencies run: yarn install diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c0fd0379f..8f889b22a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,7 @@ on: pull_request jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v4 @@ -16,7 +16,7 @@ jobs: with: node-version: "18" cache: "yarn" - + - name: Install dependencies run: yarn install diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 67ae85d7e..6bceec97c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: matrix: include: - platform: linux/amd64 - runner: ubuntu-latest + runner: ubuntu-24.04 arch: amd64 - platform: linux/arm64 runner: ubuntu-24.04-arm64 @@ -48,7 +48,7 @@ jobs: merge-manifests: needs: build - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3f407a043..6e447e67f 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,7 +5,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b886d0b34..c43d825dc 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ on: jobs: stale: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write pull-requests: write diff --git a/.yarnrc b/.yarnrc index f757a6ac5..4f14322dc 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1 +1 @@ ---ignore-engines true \ No newline at end of file +--ignore-engines true diff --git a/package.json b/package.json index 92febd9a8..cf6c3aa36 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "superjson": "^2.2.1", "thirdweb": "^5.71.0", "uuid": "^9.0.1", + "viem": "^2.21.54", "winston": "^3.14.1", "zod": "^3.23.8" }, @@ -94,8 +95,6 @@ "resolutions": { "@thirdweb-dev/auth/**/axios": ">=1.7.8", "@thirdweb-dev/auth/**/web3-utils": ">=4.2.1", - "ethers-gcp-kms-signer/**/protobufjs": ">=7.2.5", - "fastify/**/find-my-way": ">=8.2.2", "@grpc/grpc-js": ">=1.8.22", "body-parser": ">=1.20.3", "cookie": ">=0.7.0", diff --git a/src/polyfill.ts b/src/polyfill.ts index 029207c32..f1df8ef43 100644 --- a/src/polyfill.ts +++ b/src/polyfill.ts @@ -1,5 +1,6 @@ import * as crypto from "node:crypto"; if (typeof globalThis.crypto === "undefined") { - (globalThis as any).crypto = crypto; + // @ts-expect-error + globalThis.crypto = crypto; } diff --git a/src/server/listeners/update-tx-listener.ts b/src/server/listeners/update-tx-listener.ts index d871d0000..e7302fd0e 100644 --- a/src/server/listeners/update-tx-listener.ts +++ b/src/server/listeners/update-tx-listener.ts @@ -68,7 +68,7 @@ export const updateTxListener = async (): Promise => { }); }); - connection.on("error", async (err: any) => { + connection.on("error", async (err: unknown) => { logger({ service: "server", level: "error", diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 99df90131..f29804e70 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -126,7 +126,7 @@ export async function withAuth(server: FastifyInstance) { }if (error) { message = error; } - } catch (err: any) { + } catch (err: unknown) { logger({ service: "server", level: "warn", diff --git a/src/server/middleware/error.ts b/src/server/middleware/error.ts index 3957f2758..92dbf8200 100644 --- a/src/server/middleware/error.ts +++ b/src/server/middleware/error.ts @@ -42,7 +42,7 @@ export const badChainError = (chain: string | number): CustomError => "INVALID_CHAIN", ); -const flipObject = (data: any) => +const flipObject = (data: object) => Object.fromEntries(Object.entries(data).map(([key, value]) => [value, key])); const isZodError = (err: unknown): boolean => { @@ -72,7 +72,7 @@ export function withErrorHandler(server: FastifyInstance) { message: "code" in error ? error.code : error.message, reason: error.message, statusCode: 400, - stack: env.NODE_ENV !== "production" ? error.stack : undefined, + stack: env.NODE_ENV === "production" ? undefined : error.stack, }, }); } @@ -80,7 +80,7 @@ export function withErrorHandler(server: FastifyInstance) { // Zod Typings Errors if (isZodError(error)) { const _error = error as ZodError; - let parsedMessage: any[] = []; + let parsedMessage: unknown; try { parsedMessage = JSON.parse(_error.message); @@ -98,7 +98,7 @@ export function withErrorHandler(server: FastifyInstance) { message: errorObject.message ?? "Invalid Request", reason: errorObject ?? undefined, statusCode: 400, - stack: env.NODE_ENV !== "production" ? _error.stack : undefined, + stack: env.NODE_ENV === "production" ? undefined : _error.stack, }, }); } @@ -118,7 +118,7 @@ export function withErrorHandler(server: FastifyInstance) { code, message, statusCode, - stack: env.NODE_ENV !== "production" ? error.stack : undefined, + stack: env.NODE_ENV === "production" ? undefined : error.stack, }, }); } @@ -128,7 +128,7 @@ export function withErrorHandler(server: FastifyInstance) { statusCode: 500, code: "INTERNAL_SERVER_ERROR", message: error.message || ReasonPhrases.INTERNAL_SERVER_ERROR, - stack: env.NODE_ENV !== "production" ? error.stack : undefined, + stack: env.NODE_ENV === "production" ? undefined : error.stack, }, }); }, diff --git a/src/server/routes/backend-wallet/sign-transaction.ts b/src/server/routes/backend-wallet/sign-transaction.ts index fbdf1bec4..5e3b3332b 100644 --- a/src/server/routes/backend-wallet/sign-transaction.ts +++ b/src/server/routes/backend-wallet/sign-transaction.ts @@ -2,6 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Hex } from "thirdweb"; +import type { TransactionSerializable } from "viem"; import { getAccount } from "../../../shared/utils/account"; import { getChecksumAddress, @@ -70,8 +71,7 @@ export async function signTransaction(fastify: FastifyInstance) { ); } - // @TODO: Assert type to viem TransactionSerializable. - const serializableTransaction: any = { + const serializableTransaction = { chainId: transaction.chainId, to: getChecksumAddress(transaction.to), nonce: maybeInt(transaction.nonce), @@ -86,7 +86,7 @@ export async function signTransaction(fastify: FastifyInstance) { maxFeePerGas: maybeBigInt(transaction.maxFeePerGas), maxPriorityFeePerGas: maybeBigInt(transaction.maxPriorityFeePerGas), ccipReadEnabled: transaction.ccipReadEnabled, - }; + } as TransactionSerializable; const signature = await account.signTransaction(serializableTransaction); reply.status(StatusCodes.OK).send({ diff --git a/src/server/routes/contract/extensions/erc20/read/allowance-of.ts b/src/server/routes/contract/extensions/erc20/read/allowance-of.ts index cb8b8a53b..3020eecee 100644 --- a/src/server/routes/contract/extensions/erc20/read/allowance-of.ts +++ b/src/server/routes/contract/extensions/erc20/read/allowance-of.ts @@ -67,7 +67,7 @@ export async function erc20AllowanceOf(fastify: FastifyInstance) { chainId, contractAddress, }); - const returnData: any = await contract.erc20.allowanceOf( + const returnData = await contract.erc20.allowanceOf( ownerWallet ? ownerWallet : "", spenderWallet ? spenderWallet : "", ); diff --git a/src/server/routes/contract/extensions/erc20/read/get.ts b/src/server/routes/contract/extensions/erc20/read/get.ts index d2e783afd..dbd3b933b 100644 --- a/src/server/routes/contract/extensions/erc20/read/get.ts +++ b/src/server/routes/contract/extensions/erc20/read/get.ts @@ -54,12 +54,12 @@ export async function erc20GetMetadata(fastify: FastifyInstance) { chainId, contractAddress, }); - const returnData: any = await contract.erc20.get(); + const returnData = await contract.erc20.get(); reply.status(StatusCodes.OK).send({ result: { symbol: returnData.symbol, name: returnData.name, - decimals: returnData.decimals, + decimals: returnData.decimals.toString(), }, }); }, diff --git a/src/server/routes/transaction/blockchain/send-signed-user-op.ts b/src/server/routes/transaction/blockchain/send-signed-user-op.ts index cdccaf42d..03acb2cc3 100644 --- a/src/server/routes/transaction/blockchain/send-signed-user-op.ts +++ b/src/server/routes/transaction/blockchain/send-signed-user-op.ts @@ -8,6 +8,7 @@ import { TransactionHashSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/shared-api-schemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; +import { prettifyError } from "../../../../shared/utils/error"; const UserOp = Type.Object({ sender: Type.String(), @@ -86,10 +87,10 @@ export async function sendSignedUserOp(fastify: FastifyInstance) { if (typeof signedUserOp === "string") { try { userOp = Value.Decode(UserOpString, signedUserOp); - } catch (err: any) { + } catch (err) { return res.status(400).send({ error: { - message: `Invalid signed user operation. - ${err.message || err}`, + message: `Invalid signed user operation. - ${prettifyError(err)}`, }, }); } diff --git a/src/server/utils/convertor.ts b/src/server/utils/convertor.ts index 7082e53c9..5f0334679 100644 --- a/src/server/utils/convertor.ts +++ b/src/server/utils/convertor.ts @@ -1,14 +1,13 @@ import { BigNumber } from "ethers"; -export const bigNumberReplacer = (value: any): any => { +const isHexBigNumber = (value: unknown) => { + const isNonNullObject = typeof value === "object" && value !== null; + const hasType = isNonNullObject && "type" in value; + return hasType && value.type === "BigNumber" && "hex" in value +} +export const bigNumberReplacer = (value: unknown): unknown => { // if we find a BigNumber then make it into a string (since that is safe) - if ( - BigNumber.isBigNumber(value) || - (typeof value === "object" && - value !== null && - value.type === "BigNumber" && - "hex" in value) - ) { + if (BigNumber.isBigNumber(value) || isHexBigNumber(value)) { return BigNumber.from(value).toString(); } diff --git a/src/server/utils/wallets/get-aws-kms-account.ts b/src/server/utils/wallets/get-aws-kms-account.ts index 33d828ec7..eed862cda 100644 --- a/src/server/utils/wallets/get-aws-kms-account.ts +++ b/src/server/utils/wallets/get-aws-kms-account.ts @@ -117,5 +117,5 @@ export async function getAwsKmsAccount( signMessage, signTypedData, signTransaction, - } satisfies Account; + } as AwsKmsAccount satisfies Account; } diff --git a/src/server/utils/wallets/get-gcp-kms-account.ts b/src/server/utils/wallets/get-gcp-kms-account.ts index cf02625a7..83945ac7d 100644 --- a/src/server/utils/wallets/get-gcp-kms-account.ts +++ b/src/server/utils/wallets/get-gcp-kms-account.ts @@ -133,5 +133,5 @@ export async function getGcpKmsAccount( signMessage, signTypedData, signTransaction, - } satisfies Account; + } as GcpKmsAccount satisfies Account; } diff --git a/src/shared/db/transactions/queue-tx.ts b/src/shared/db/transactions/queue-tx.ts index e6a63843b..0bd1d4a8a 100644 --- a/src/shared/db/transactions/queue-tx.ts +++ b/src/shared/db/transactions/queue-tx.ts @@ -9,7 +9,7 @@ import { parseTransactionOverrides } from "../../../server/utils/transaction-ove interface QueueTxParams { // we should move away from Transaction type (v4 SDK) - tx: Transaction | DeployTransaction; + tx: Transaction | DeployTransaction; chainId: number; extension: ContractExtension; // TODO: These shouldn't be in here diff --git a/src/shared/lib/cache/swr.ts b/src/shared/lib/cache/swr.ts index 800e25e4b..5f24157d7 100644 --- a/src/shared/lib/cache/swr.ts +++ b/src/shared/lib/cache/swr.ts @@ -75,7 +75,7 @@ export class SWRCache { private set(key: K, data: V): void { if (this.cache.size >= this.options.maxEntries) { const firstKey = this.cache.keys().next().value; - this.cache.delete(firstKey); + this.cache.delete(firstKey as K); } this.cache.set(key, { diff --git a/src/shared/utils/ethers.ts b/src/shared/utils/ethers.ts index 15f1ff095..a430c467a 100644 --- a/src/shared/utils/ethers.ts +++ b/src/shared/utils/ethers.ts @@ -20,7 +20,7 @@ export interface EthersError extends Error { * * This is generally helpful mostly for human-based debugging. */ - info?: Record; + info?: Record; /** * Any related error. @@ -35,17 +35,14 @@ export const ETHERS_ERROR_CODES = new Set(Object.values(ethers.errors)); * @param error * @returns EthersError | null */ -export const parseEthersError = (error: any): EthersError | null => { - if ( - error && - typeof error === "object" && - "code" in error && - ETHERS_ERROR_CODES.has(error.code) - ) { +export const parseEthersError = (error: unknown): EthersError | null => { + const isNonNullObject = error && typeof error === "object"; + const hasCodeProperty = isNonNullObject && "code" in error; + if (hasCodeProperty && ETHERS_ERROR_CODES.has(error.code as ethers.errors)) { return error as EthersError; } return null; }; -export const isEthersErrorCode = (error: any, code: ethers.errors) => +export const isEthersErrorCode = (error: unknown, code: ethers.errors) => parseEthersError(error)?.code === code; diff --git a/src/shared/utils/logger.ts b/src/shared/utils/logger.ts index 3b4372bf5..5c51c4c8f 100644 --- a/src/shared/utils/logger.ts +++ b/src/shared/utils/logger.ts @@ -59,7 +59,7 @@ const winstonLogger = createLogger({ colorizeFormat(), format.printf(({ level, message, timestamp, error }) => { if (error) { - return `[${timestamp}] ${level}: ${message} - ${error.stack}`; + return `[${timestamp}] ${level}: ${message} - ${(error as Error).stack}`; } return `[${timestamp}] ${level}: ${message}`; }), @@ -82,8 +82,8 @@ interface LoggerParams { level: (typeof env)["LOG_LEVEL"]; message: string; queueId?: string | null; - error?: any; - data?: any; + error?: unknown; + data?: unknown; } export const logger = ({ diff --git a/src/shared/utils/transaction/simulate-queued-transaction.ts b/src/shared/utils/transaction/simulate-queued-transaction.ts index 2a39a8575..7fdbd5156 100644 --- a/src/shared/utils/transaction/simulate-queued-transaction.ts +++ b/src/shared/utils/transaction/simulate-queued-transaction.ts @@ -1,3 +1,4 @@ +import { TransactionError } from "@thirdweb-dev/sdk"; import { prepareTransaction, simulateTransaction, @@ -70,7 +71,10 @@ export const doSimulateTransaction = async ( account, }); return null; - } catch (e: any) { + } catch (e: unknown) { + if (!(e instanceof TransactionError)) { + throw e; + } // Error should be of type TransactionError in the thirdweb SDK. return `${e.name}: ${e.message}`; } diff --git a/src/shared/utils/transaction/types.ts b/src/shared/utils/transaction/types.ts index d4846a4a8..4509dc18b 100644 --- a/src/shared/utils/transaction/types.ts +++ b/src/shared/utils/transaction/types.ts @@ -23,7 +23,7 @@ export type InsertedTransaction = { data?: Hex; functionName?: string; - functionArgs?: any[]; + functionArgs?: unknown[]; // User-provided overrides. overrides?: { diff --git a/src/worker/listeners/config-listener.ts b/src/worker/listeners/config-listener.ts index 9168fe9fb..bda2e9c9f 100644 --- a/src/worker/listeners/config-listener.ts +++ b/src/worker/listeners/config-listener.ts @@ -35,7 +35,7 @@ export const newConfigurationListener = async (): Promise => { }); }); - connection.on("error", async (err: any) => { + connection.on("error", async (err: unknown) => { logger({ service: "worker", level: "error", @@ -93,7 +93,7 @@ export const updatedConfigurationListener = async (): Promise => { }); }); - connection.on("error", async (err: any) => { + connection.on("error", async (err: unknown) => { logger({ service: "worker", level: "error", diff --git a/src/worker/listeners/webhook-listener.ts b/src/worker/listeners/webhook-listener.ts index 813100f8a..759182170 100644 --- a/src/worker/listeners/webhook-listener.ts +++ b/src/worker/listeners/webhook-listener.ts @@ -38,7 +38,7 @@ export const newWebhooksListener = async (): Promise => { }); }); - connection.on("error", async (err: any) => { + connection.on("error", async (err: unknown) => { logger({ service: "worker", level: "error", @@ -94,7 +94,7 @@ export const updatedWebhooksListener = async (): Promise => { }); }); - connection.on("error", async (err: any) => { + connection.on("error", async (err: unknown) => { logger({ service: "worker", level: "error", diff --git a/src/worker/queues/send-webhook-queue.ts b/src/worker/queues/send-webhook-queue.ts index 273e2827e..1f79bc224 100644 --- a/src/worker/queues/send-webhook-queue.ts +++ b/src/worker/queues/send-webhook-queue.ts @@ -10,7 +10,6 @@ import { type BackendWalletBalanceWebhookParams, } from "../../shared/schemas/webhooks"; import { getWebhooksByEventType } from "../../shared/utils/cache/get-webhook"; -import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; import { defaultJobOptions } from "./queues"; @@ -67,12 +66,6 @@ export class SendWebhookQueue { return this._enqueueTransactionWebhook(data); case WebhooksEventTypes.BACKEND_WALLET_BALANCE: return this._enqueueBackendWalletBalanceWebhook(data); - default: - logger({ - service: "worker", - level: "warn", - message: `Unexpected webhook type: ${(data as any).type}`, - }); } }; diff --git a/src/worker/tasks/cancel-recycled-nonces-worker.ts b/src/worker/tasks/cancel-recycled-nonces-worker.ts index 0757cdb9f..7a3629375 100644 --- a/src/worker/tasks/cancel-recycled-nonces-worker.ts +++ b/src/worker/tasks/cancel-recycled-nonces-worker.ts @@ -31,7 +31,7 @@ export const initCancelRecycledNoncesWorker = () => { /** * Sends a cancel transaction for all recycled nonces. */ -const handler: Processor = async (job: Job) => { +const handler: Processor = async (job: Job) => { const keys = await redis.keys("nonce-recycled:*"); for (const key of keys) { diff --git a/src/worker/tasks/mine-transaction-worker.ts b/src/worker/tasks/mine-transaction-worker.ts index e0c649f1c..69d8b0184 100644 --- a/src/worker/tasks/mine-transaction-worker.ts +++ b/src/worker/tasks/mine-transaction-worker.ts @@ -50,7 +50,7 @@ import { SendWebhookQueue } from "../queues/send-webhook-queue"; * * If an EOA transaction is not mined after some time, resend it. */ -const handler: Processor = async (job: Job) => { +const handler: Processor = async (job: Job) => { const { queueId } = superjson.parse(job.data); // Assert valid transaction state. diff --git a/src/worker/tasks/nonce-resync-worker.ts b/src/worker/tasks/nonce-resync-worker.ts index d7ccfe553..caf8af26f 100644 --- a/src/worker/tasks/nonce-resync-worker.ts +++ b/src/worker/tasks/nonce-resync-worker.ts @@ -39,7 +39,7 @@ export const initNonceResyncWorker = async () => { * * This is to unblock a wallet that has been stuck due to one or more skipped nonces. */ -const handler: Processor = async (job: Job) => { +const handler: Processor = async (job: Job) => { const sentNoncesKeys = await redis.keys("nonce-sent:*"); if (sentNoncesKeys.length === 0) { job.log("No active wallets."); diff --git a/src/worker/tasks/process-event-logs-worker.ts b/src/worker/tasks/process-event-logs-worker.ts index b017b0a0c..95e3c9859 100644 --- a/src/worker/tasks/process-event-logs-worker.ts +++ b/src/worker/tasks/process-event-logs-worker.ts @@ -30,7 +30,7 @@ import { import { logWorkerExceptions } from "../queues/queues"; import { SendWebhookQueue } from "../queues/send-webhook-queue"; -const handler: Processor = async (job: Job) => { +const handler: Processor = async (job: Job) => { const { chainId, filters = [], @@ -274,7 +274,7 @@ const getBlockTimestamps = async ( return res; }; -const logArgToString = (arg: any): string => { +const logArgToString = (arg: unknown): string => { if (arg === null) { return ""; } @@ -284,7 +284,7 @@ const logArgToString = (arg: any): string => { if (Array.isArray(arg)) { return arg.map(logArgToString).join(","); } - return arg.toString(); + return String(arg); }; // Must be explicitly called for the worker to run on this host. diff --git a/src/worker/tasks/process-transaction-receipts-worker.ts b/src/worker/tasks/process-transaction-receipts-worker.ts index 8605cb257..1d4e64703 100644 --- a/src/worker/tasks/process-transaction-receipts-worker.ts +++ b/src/worker/tasks/process-transaction-receipts-worker.ts @@ -27,7 +27,7 @@ import { logWorkerExceptions } from "../queues/queues"; import { SendWebhookQueue } from "../queues/send-webhook-queue"; import { getWebhooksByContractAddresses } from "./process-event-logs-worker"; -const handler: Processor = async (job: Job) => { +const handler: Processor = async (job: Job) => { const { chainId, filters = [], diff --git a/src/worker/tasks/prune-transactions-worker.ts b/src/worker/tasks/prune-transactions-worker.ts index 160f70e02..4bac12a27 100644 --- a/src/worker/tasks/prune-transactions-worker.ts +++ b/src/worker/tasks/prune-transactions-worker.ts @@ -6,7 +6,7 @@ import { redis } from "../../shared/utils/redis/redis"; import { PruneTransactionsQueue } from "../queues/prune-transactions-queue"; import { logWorkerExceptions } from "../queues/queues"; -const handler: Processor = async (job: Job) => { +const handler: Processor = async (job: Job) => { const numTransactionsDeleted = await TransactionDB.pruneTransactionDetailsAndLists( env.TRANSACTION_HISTORY_COUNT, diff --git a/src/worker/tasks/send-webhook-worker.ts b/src/worker/tasks/send-webhook-worker.ts index b2bcf5147..dda1f1f5b 100644 --- a/src/worker/tasks/send-webhook-worker.ts +++ b/src/worker/tasks/send-webhook-worker.ts @@ -20,7 +20,7 @@ import { } from "../../shared/utils/webhook"; import { SendWebhookQueue, type WebhookJob } from "../queues/send-webhook-queue"; -const handler: Processor = async (job: Job) => { +const handler: Processor = async (job: Job) => { const { data, webhook } = superjson.parse(job.data); let resp: WebhookResponse | undefined; @@ -28,7 +28,7 @@ const handler: Processor = async (job: Job) => { case WebhooksEventTypes.CONTRACT_SUBSCRIPTION: { let webhookBody: { type: "event-log" | "transaction-receipt"; - data: any; + data: unknown; }; if (data.eventLog) { webhookBody = { diff --git a/tests/e2e/config.ts b/tests/e2e/config.ts index 83cd7d067..f1a111e49 100644 --- a/tests/e2e/config.ts +++ b/tests/e2e/config.ts @@ -1,4 +1,4 @@ -import assert from "assert"; +import assert from "node:assert"; import { anvil, type Chain } from "thirdweb/chains"; assert(process.env.ENGINE_URL, "ENGINE_URL is required"); diff --git a/tests/e2e/scripts/counter.ts b/tests/e2e/scripts/counter.ts index b0c40f50e..121e894e1 100644 --- a/tests/e2e/scripts/counter.ts +++ b/tests/e2e/scripts/counter.ts @@ -16,9 +16,9 @@ async function countLines(file: string) { if (!line.trim()) { continue; } - - if (statements.has(line)) { - statements.set(line, statements.get(line)! + 1); + const statement = statements.get(line); + if (statement !== undefined) { + statements.set(line, statement + 1); } else { statements.set(line, 1); } diff --git a/tests/e2e/tests/extensions.test.ts b/tests/e2e/tests/extensions.test.ts index ed0674da8..4fdb3c89c 100644 --- a/tests/e2e/tests/extensions.test.ts +++ b/tests/e2e/tests/extensions.test.ts @@ -38,8 +38,9 @@ describe("Extensions", () => { let mined = false; + assert(res.result.queueId, "Queue ID is not defined"); while (!mined) { - const statusRes = await engine.transaction.status(res.result.queueId!); + const statusRes = await engine.transaction.status(res.result.queueId); mined = statusRes.result.status === "mined"; await sleep(1000); } @@ -68,10 +69,11 @@ describe("Extensions", () => { ); expect(res.result.queueId).toBeDefined(); + assert(res.result.queueId, "Queue ID is not defined"); let mined = false; while (!mined) { - const status = await engine.transaction.status(res.result.queueId!); + const status = await engine.transaction.status(res.result.queueId); mined = !!status.result.minedAt; await sleep(1000); } diff --git a/tests/e2e/tests/load.test.ts b/tests/e2e/tests/load.test.ts index 0cdea6317..24eb798a2 100644 --- a/tests/e2e/tests/load.test.ts +++ b/tests/e2e/tests/load.test.ts @@ -79,8 +79,10 @@ describe("Load Test Transactions", () => { assert(nftContractAddress, "NFT contract address is not defined"); + assert(deployRes.result.queueId, "Queue ID is not defined"); + // Wait for the contract to be deployed - await pollTransactionStatus(engine, deployRes.result.queueId!); + await pollTransactionStatus(engine, deployRes.result.queueId); const timings = []; for ( diff --git a/tests/unit/auth.test.ts b/tests/unit/auth.test.ts index c7597e08d..7bf3ca1be 100644 --- a/tests/unit/auth.test.ts +++ b/tests/unit/auth.test.ts @@ -16,7 +16,7 @@ import { getConfig } from "../../src/shared/utils/cache/get-config"; import { getWebhooksByEventType } from "../../src/shared/utils/cache/get-webhook"; import { getKeypair } from "../../src/shared/utils/cache/keypair"; import { sendWebhookRequest } from "../../src/shared/utils/webhook"; -import { Permission } from "../../src/shared/schemas"; +import { Permission } from "../../src/shared/schemas/auth"; vi.mock("../utils/cache/accessToken"); const mockGetAccessToken = vi.mocked(getAccessToken); @@ -278,11 +278,6 @@ describe("Websocket requests", () => { session: { permissions: Permission.Admin }, }); - const mockSocket = { - write: vi.fn(), - destroy: vi.fn(), - }; - const defaultConfig = await getConfig(); mockGetConfig.mockResolvedValueOnce({ ...defaultConfig, diff --git a/yarn.lock b/yarn.lock index e716a4125..0bf0ebf89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -73,933 +73,497 @@ "@smithy/util-utf8" "^2.0.0" tslib "^2.6.2" -"@aws-sdk/client-kms@^3.28.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-kms/-/client-kms-3.637.0.tgz#4e3836971b14b348e845a1f63c8548aa5633fae4" - integrity sha512-bqppLpmIPl6eZkZx/9axnr4CBbhtrRKe3LffW8320DlwCqP3zU+c500vXMjEgYdrAqkqOFyDY/FYMAgZhtHVCQ== +"@aws-sdk/client-kms@^3.28.0", "@aws-sdk/client-kms@^3.679.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-kms/-/client-kms-3.709.0.tgz#53dbd9bde3f184a11093fe44af3cb00dfdc1284a" + integrity sha512-0qx0Dmsx5JiV4swrBr55lYRIhw6kYQul5aBOnzoGCMx1SFixtBKdzeQYp9lyaU9RPhst6KCE8J6mxG0CxkSQGw== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" - "@aws-sdk/middleware-host-header" "3.620.0" - "@aws-sdk/middleware-logger" "3.609.0" - "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" - "@aws-sdk/region-config-resolver" "3.614.0" - "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" - "@aws-sdk/util-user-agent-browser" "3.609.0" - "@aws-sdk/util-user-agent-node" "3.614.0" - "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" - "@smithy/fetch-http-handler" "^3.2.4" - "@smithy/hash-node" "^3.0.3" - "@smithy/invalid-dependency" "^3.0.3" - "@smithy/middleware-content-length" "^3.0.5" - "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" - "@smithy/middleware-serde" "^3.0.3" - "@smithy/middleware-stack" "^3.0.3" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/node-http-handler" "^3.1.4" - "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - "@smithy/url-parser" "^3.0.3" + "@aws-sdk/client-sso-oidc" "3.709.0" + "@aws-sdk/client-sts" "3.709.0" + "@aws-sdk/core" "3.709.0" + "@aws-sdk/credential-provider-node" "3.709.0" + "@aws-sdk/middleware-host-header" "3.709.0" + "@aws-sdk/middleware-logger" "3.709.0" + "@aws-sdk/middleware-recursion-detection" "3.709.0" + "@aws-sdk/middleware-user-agent" "3.709.0" + "@aws-sdk/region-config-resolver" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@aws-sdk/util-endpoints" "3.709.0" + "@aws-sdk/util-user-agent-browser" "3.709.0" + "@aws-sdk/util-user-agent-node" "3.709.0" + "@smithy/config-resolver" "^3.0.13" + "@smithy/core" "^2.5.5" + "@smithy/fetch-http-handler" "^4.1.2" + "@smithy/hash-node" "^3.0.11" + "@smithy/invalid-dependency" "^3.0.11" + "@smithy/middleware-content-length" "^3.0.13" + "@smithy/middleware-endpoint" "^3.2.5" + "@smithy/middleware-retry" "^3.0.30" + "@smithy/middleware-serde" "^3.0.11" + "@smithy/middleware-stack" "^3.0.11" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/node-http-handler" "^3.3.2" + "@smithy/protocol-http" "^4.1.8" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" + "@smithy/url-parser" "^3.0.11" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" - "@smithy/util-endpoints" "^2.0.5" - "@smithy/util-middleware" "^3.0.3" - "@smithy/util-retry" "^3.0.3" + "@smithy/util-defaults-mode-browser" "^3.0.30" + "@smithy/util-defaults-mode-node" "^3.0.30" + "@smithy/util-endpoints" "^2.1.7" + "@smithy/util-middleware" "^3.0.11" + "@smithy/util-retry" "^3.0.11" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-kms@^3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-kms/-/client-kms-3.679.0.tgz#104592b0bdbc20b36681f84be683a6b8c714c808" - integrity sha512-iZ/XWDQHCS6mRHm/dHegtF9BW8lgY51yqh/pTZcosxmYQECQZJyBBDHECw0t0ASzAW+7098tvrc9tJNExgDjHw== +"@aws-sdk/client-sso-oidc@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.709.0.tgz#959e4df4070f1d059d8d0cd5b9028d9a46ac7ecf" + integrity sha512-1w6egz17QQy661lNCRmZZlqIANEbD6g2VFAQIJbVwSiu7brg+GUns+mT1eLLLHAMQc1sL0Ds8/ybSK2SrgGgIA== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.679.0" - "@aws-sdk/client-sts" "3.679.0" - "@aws-sdk/core" "3.679.0" - "@aws-sdk/credential-provider-node" "3.679.0" - "@aws-sdk/middleware-host-header" "3.679.0" - "@aws-sdk/middleware-logger" "3.679.0" - "@aws-sdk/middleware-recursion-detection" "3.679.0" - "@aws-sdk/middleware-user-agent" "3.679.0" - "@aws-sdk/region-config-resolver" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@aws-sdk/util-endpoints" "3.679.0" - "@aws-sdk/util-user-agent-browser" "3.679.0" - "@aws-sdk/util-user-agent-node" "3.679.0" - "@smithy/config-resolver" "^3.0.9" - "@smithy/core" "^2.4.8" - "@smithy/fetch-http-handler" "^3.2.9" - "@smithy/hash-node" "^3.0.7" - "@smithy/invalid-dependency" "^3.0.7" - "@smithy/middleware-content-length" "^3.0.9" - "@smithy/middleware-endpoint" "^3.1.4" - "@smithy/middleware-retry" "^3.0.23" - "@smithy/middleware-serde" "^3.0.7" - "@smithy/middleware-stack" "^3.0.7" - "@smithy/node-config-provider" "^3.1.8" - "@smithy/node-http-handler" "^3.2.4" - "@smithy/protocol-http" "^4.1.4" - "@smithy/smithy-client" "^3.4.0" - "@smithy/types" "^3.5.0" - "@smithy/url-parser" "^3.0.7" + "@aws-sdk/core" "3.709.0" + "@aws-sdk/credential-provider-node" "3.709.0" + "@aws-sdk/middleware-host-header" "3.709.0" + "@aws-sdk/middleware-logger" "3.709.0" + "@aws-sdk/middleware-recursion-detection" "3.709.0" + "@aws-sdk/middleware-user-agent" "3.709.0" + "@aws-sdk/region-config-resolver" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@aws-sdk/util-endpoints" "3.709.0" + "@aws-sdk/util-user-agent-browser" "3.709.0" + "@aws-sdk/util-user-agent-node" "3.709.0" + "@smithy/config-resolver" "^3.0.13" + "@smithy/core" "^2.5.5" + "@smithy/fetch-http-handler" "^4.1.2" + "@smithy/hash-node" "^3.0.11" + "@smithy/invalid-dependency" "^3.0.11" + "@smithy/middleware-content-length" "^3.0.13" + "@smithy/middleware-endpoint" "^3.2.5" + "@smithy/middleware-retry" "^3.0.30" + "@smithy/middleware-serde" "^3.0.11" + "@smithy/middleware-stack" "^3.0.11" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/node-http-handler" "^3.3.2" + "@smithy/protocol-http" "^4.1.8" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" + "@smithy/url-parser" "^3.0.11" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.23" - "@smithy/util-defaults-mode-node" "^3.0.23" - "@smithy/util-endpoints" "^2.1.3" - "@smithy/util-middleware" "^3.0.7" - "@smithy/util-retry" "^3.0.7" + "@smithy/util-defaults-mode-browser" "^3.0.30" + "@smithy/util-defaults-mode-node" "^3.0.30" + "@smithy/util-endpoints" "^2.1.7" + "@smithy/util-middleware" "^3.0.11" + "@smithy/util-retry" "^3.0.11" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sso-oidc@3.637.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.637.0.tgz#d7e22ce6627c3285bf311e6c9e64c22b99bbd76a" - integrity sha512-27bHALN6Qb6m6KZmPvRieJ/QRlj1lyac/GT2Rn5kJpre8Mpp+yxrtvp3h9PjNBty4lCeFEENfY4dGNSozBuBcw== +"@aws-sdk/client-sso@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.709.0.tgz#b5b29161e07af6f82afd7a6e750c09b0158d19e3" + integrity sha512-Qxeo8cN0jNy6Wnbqq4wucffAGJM6sJjofoTgNtPA6cC7sPYx7aYC6OAAAo6NaMRY+WywOKdS9Wgjx2QYRxKx7w== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" - "@aws-sdk/middleware-host-header" "3.620.0" - "@aws-sdk/middleware-logger" "3.609.0" - "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" - "@aws-sdk/region-config-resolver" "3.614.0" - "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" - "@aws-sdk/util-user-agent-browser" "3.609.0" - "@aws-sdk/util-user-agent-node" "3.614.0" - "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" - "@smithy/fetch-http-handler" "^3.2.4" - "@smithy/hash-node" "^3.0.3" - "@smithy/invalid-dependency" "^3.0.3" - "@smithy/middleware-content-length" "^3.0.5" - "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" - "@smithy/middleware-serde" "^3.0.3" - "@smithy/middleware-stack" "^3.0.3" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/node-http-handler" "^3.1.4" - "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - "@smithy/url-parser" "^3.0.3" + "@aws-sdk/core" "3.709.0" + "@aws-sdk/middleware-host-header" "3.709.0" + "@aws-sdk/middleware-logger" "3.709.0" + "@aws-sdk/middleware-recursion-detection" "3.709.0" + "@aws-sdk/middleware-user-agent" "3.709.0" + "@aws-sdk/region-config-resolver" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@aws-sdk/util-endpoints" "3.709.0" + "@aws-sdk/util-user-agent-browser" "3.709.0" + "@aws-sdk/util-user-agent-node" "3.709.0" + "@smithy/config-resolver" "^3.0.13" + "@smithy/core" "^2.5.5" + "@smithy/fetch-http-handler" "^4.1.2" + "@smithy/hash-node" "^3.0.11" + "@smithy/invalid-dependency" "^3.0.11" + "@smithy/middleware-content-length" "^3.0.13" + "@smithy/middleware-endpoint" "^3.2.5" + "@smithy/middleware-retry" "^3.0.30" + "@smithy/middleware-serde" "^3.0.11" + "@smithy/middleware-stack" "^3.0.11" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/node-http-handler" "^3.3.2" + "@smithy/protocol-http" "^4.1.8" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" + "@smithy/url-parser" "^3.0.11" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" - "@smithy/util-endpoints" "^2.0.5" - "@smithy/util-middleware" "^3.0.3" - "@smithy/util-retry" "^3.0.3" + "@smithy/util-defaults-mode-browser" "^3.0.30" + "@smithy/util-defaults-mode-node" "^3.0.30" + "@smithy/util-endpoints" "^2.1.7" + "@smithy/util-middleware" "^3.0.11" + "@smithy/util-retry" "^3.0.11" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sso-oidc@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.679.0.tgz#00de670c9ea31c5073f6eed6842795e70bc63fca" - integrity sha512-/dBYWcCwbA/id4sFCIVZvf0UsvzHCC68SryxeNQk/PDkY9N4n5yRcMUkZDaEyQCjowc3kY4JOXp2AdUP037nhA== +"@aws-sdk/client-sts@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.709.0.tgz#b9ad3c9c6419d0d149b28cdd6c115cc40c4e7906" + integrity sha512-cBAvlPg6yslXNL385UUGFPw+XY+lA9BzioNdIFkMo3fEUlTShogTtiWz4LsyLHoN6LhKojssP9DSmmWKWjCZIw== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.679.0" - "@aws-sdk/credential-provider-node" "3.679.0" - "@aws-sdk/middleware-host-header" "3.679.0" - "@aws-sdk/middleware-logger" "3.679.0" - "@aws-sdk/middleware-recursion-detection" "3.679.0" - "@aws-sdk/middleware-user-agent" "3.679.0" - "@aws-sdk/region-config-resolver" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@aws-sdk/util-endpoints" "3.679.0" - "@aws-sdk/util-user-agent-browser" "3.679.0" - "@aws-sdk/util-user-agent-node" "3.679.0" - "@smithy/config-resolver" "^3.0.9" - "@smithy/core" "^2.4.8" - "@smithy/fetch-http-handler" "^3.2.9" - "@smithy/hash-node" "^3.0.7" - "@smithy/invalid-dependency" "^3.0.7" - "@smithy/middleware-content-length" "^3.0.9" - "@smithy/middleware-endpoint" "^3.1.4" - "@smithy/middleware-retry" "^3.0.23" - "@smithy/middleware-serde" "^3.0.7" - "@smithy/middleware-stack" "^3.0.7" - "@smithy/node-config-provider" "^3.1.8" - "@smithy/node-http-handler" "^3.2.4" - "@smithy/protocol-http" "^4.1.4" - "@smithy/smithy-client" "^3.4.0" - "@smithy/types" "^3.5.0" - "@smithy/url-parser" "^3.0.7" + "@aws-sdk/client-sso-oidc" "3.709.0" + "@aws-sdk/core" "3.709.0" + "@aws-sdk/credential-provider-node" "3.709.0" + "@aws-sdk/middleware-host-header" "3.709.0" + "@aws-sdk/middleware-logger" "3.709.0" + "@aws-sdk/middleware-recursion-detection" "3.709.0" + "@aws-sdk/middleware-user-agent" "3.709.0" + "@aws-sdk/region-config-resolver" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@aws-sdk/util-endpoints" "3.709.0" + "@aws-sdk/util-user-agent-browser" "3.709.0" + "@aws-sdk/util-user-agent-node" "3.709.0" + "@smithy/config-resolver" "^3.0.13" + "@smithy/core" "^2.5.5" + "@smithy/fetch-http-handler" "^4.1.2" + "@smithy/hash-node" "^3.0.11" + "@smithy/invalid-dependency" "^3.0.11" + "@smithy/middleware-content-length" "^3.0.13" + "@smithy/middleware-endpoint" "^3.2.5" + "@smithy/middleware-retry" "^3.0.30" + "@smithy/middleware-serde" "^3.0.11" + "@smithy/middleware-stack" "^3.0.11" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/node-http-handler" "^3.3.2" + "@smithy/protocol-http" "^4.1.8" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" + "@smithy/url-parser" "^3.0.11" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.23" - "@smithy/util-defaults-mode-node" "^3.0.23" - "@smithy/util-endpoints" "^2.1.3" - "@smithy/util-middleware" "^3.0.7" - "@smithy/util-retry" "^3.0.7" + "@smithy/util-defaults-mode-browser" "^3.0.30" + "@smithy/util-defaults-mode-node" "^3.0.30" + "@smithy/util-endpoints" "^2.1.7" + "@smithy/util-middleware" "^3.0.11" + "@smithy/util-retry" "^3.0.11" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sso@3.637.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.637.0.tgz#ae152759a5e1e576e1df6b8f4edaf59796e1758e" - integrity sha512-+KjLvgX5yJYROWo3TQuwBJlHCY0zz9PsLuEolmXQn0BVK1L/m9GteZHtd+rEdAoDGBpE0Xqjy1oz5+SmtsaRUw== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/middleware-host-header" "3.620.0" - "@aws-sdk/middleware-logger" "3.609.0" - "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" - "@aws-sdk/region-config-resolver" "3.614.0" - "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" - "@aws-sdk/util-user-agent-browser" "3.609.0" - "@aws-sdk/util-user-agent-node" "3.614.0" - "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" - "@smithy/fetch-http-handler" "^3.2.4" - "@smithy/hash-node" "^3.0.3" - "@smithy/invalid-dependency" "^3.0.3" - "@smithy/middleware-content-length" "^3.0.5" - "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" - "@smithy/middleware-serde" "^3.0.3" - "@smithy/middleware-stack" "^3.0.3" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/node-http-handler" "^3.1.4" - "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - "@smithy/url-parser" "^3.0.3" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" - "@smithy/util-endpoints" "^2.0.5" - "@smithy/util-middleware" "^3.0.3" - "@smithy/util-retry" "^3.0.3" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-sso@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.679.0.tgz#6d6e96ae4e8c3258793e26bcd127b9f9a621dd1b" - integrity sha512-/0cAvYnpOZTo/Y961F1kx2fhDDLUYZ0SQQ5/75gh3xVImLj7Zw+vp74ieqFbqWLYGMaq8z1Arr9A8zG95mbLdg== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.679.0" - "@aws-sdk/middleware-host-header" "3.679.0" - "@aws-sdk/middleware-logger" "3.679.0" - "@aws-sdk/middleware-recursion-detection" "3.679.0" - "@aws-sdk/middleware-user-agent" "3.679.0" - "@aws-sdk/region-config-resolver" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@aws-sdk/util-endpoints" "3.679.0" - "@aws-sdk/util-user-agent-browser" "3.679.0" - "@aws-sdk/util-user-agent-node" "3.679.0" - "@smithy/config-resolver" "^3.0.9" - "@smithy/core" "^2.4.8" - "@smithy/fetch-http-handler" "^3.2.9" - "@smithy/hash-node" "^3.0.7" - "@smithy/invalid-dependency" "^3.0.7" - "@smithy/middleware-content-length" "^3.0.9" - "@smithy/middleware-endpoint" "^3.1.4" - "@smithy/middleware-retry" "^3.0.23" - "@smithy/middleware-serde" "^3.0.7" - "@smithy/middleware-stack" "^3.0.7" - "@smithy/node-config-provider" "^3.1.8" - "@smithy/node-http-handler" "^3.2.4" - "@smithy/protocol-http" "^4.1.4" - "@smithy/smithy-client" "^3.4.0" - "@smithy/types" "^3.5.0" - "@smithy/url-parser" "^3.0.7" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.23" - "@smithy/util-defaults-mode-node" "^3.0.23" - "@smithy/util-endpoints" "^2.1.3" - "@smithy/util-middleware" "^3.0.7" - "@smithy/util-retry" "^3.0.7" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-sts@3.637.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.637.0.tgz#6dcde6640d8a5e60dd4a2df8557284a0226d182c" - integrity sha512-xUi7x4qDubtA8QREtlblPuAcn91GS/09YVEY/RwU7xCY0aqGuFwgszAANlha4OUIqva8oVj2WO4gJuG+iaSnhw== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" - "@aws-sdk/middleware-host-header" "3.620.0" - "@aws-sdk/middleware-logger" "3.609.0" - "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" - "@aws-sdk/region-config-resolver" "3.614.0" - "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" - "@aws-sdk/util-user-agent-browser" "3.609.0" - "@aws-sdk/util-user-agent-node" "3.614.0" - "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" - "@smithy/fetch-http-handler" "^3.2.4" - "@smithy/hash-node" "^3.0.3" - "@smithy/invalid-dependency" "^3.0.3" - "@smithy/middleware-content-length" "^3.0.5" - "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" - "@smithy/middleware-serde" "^3.0.3" - "@smithy/middleware-stack" "^3.0.3" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/node-http-handler" "^3.1.4" - "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - "@smithy/url-parser" "^3.0.3" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" - "@smithy/util-endpoints" "^2.0.5" - "@smithy/util-middleware" "^3.0.3" - "@smithy/util-retry" "^3.0.3" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-sts@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.679.0.tgz#4641c24032ebd69a6e0e4eb28477749e21e69884" - integrity sha512-3CvrT8w1RjFu1g8vKA5Azfr5V83r2/b68Ock43WE003Bq/5Y38mwmYX7vk0fPHzC3qejt4YMAWk/C3fSKOy25g== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.679.0" - "@aws-sdk/core" "3.679.0" - "@aws-sdk/credential-provider-node" "3.679.0" - "@aws-sdk/middleware-host-header" "3.679.0" - "@aws-sdk/middleware-logger" "3.679.0" - "@aws-sdk/middleware-recursion-detection" "3.679.0" - "@aws-sdk/middleware-user-agent" "3.679.0" - "@aws-sdk/region-config-resolver" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@aws-sdk/util-endpoints" "3.679.0" - "@aws-sdk/util-user-agent-browser" "3.679.0" - "@aws-sdk/util-user-agent-node" "3.679.0" - "@smithy/config-resolver" "^3.0.9" - "@smithy/core" "^2.4.8" - "@smithy/fetch-http-handler" "^3.2.9" - "@smithy/hash-node" "^3.0.7" - "@smithy/invalid-dependency" "^3.0.7" - "@smithy/middleware-content-length" "^3.0.9" - "@smithy/middleware-endpoint" "^3.1.4" - "@smithy/middleware-retry" "^3.0.23" - "@smithy/middleware-serde" "^3.0.7" - "@smithy/middleware-stack" "^3.0.7" - "@smithy/node-config-provider" "^3.1.8" - "@smithy/node-http-handler" "^3.2.4" - "@smithy/protocol-http" "^4.1.4" - "@smithy/smithy-client" "^3.4.0" - "@smithy/types" "^3.5.0" - "@smithy/url-parser" "^3.0.7" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.23" - "@smithy/util-defaults-mode-node" "^3.0.23" - "@smithy/util-endpoints" "^2.1.3" - "@smithy/util-middleware" "^3.0.7" - "@smithy/util-retry" "^3.0.7" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/core@3.635.0": - version "3.635.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.635.0.tgz#74b7d0d7fa3aa39f87ea5cf4e6c97d4d84f4ef14" - integrity sha512-i1x/E/sgA+liUE1XJ7rj1dhyXpAKO1UKFUcTTHXok2ARjWTvszHnSXMOsB77aPbmn0fUp1JTx2kHUAZ1LVt5Bg== - dependencies: - "@smithy/core" "^2.4.0" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/property-provider" "^3.1.3" - "@smithy/protocol-http" "^4.1.0" - "@smithy/signature-v4" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - "@smithy/util-middleware" "^3.0.3" +"@aws-sdk/core@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.709.0.tgz#d2b3d5b90f6614e3afc109ebdcaaedbb54c2d68b" + integrity sha512-7kuSpzdOTAE026j85wq/fN9UDZ70n0OHw81vFqMWwlEFtm5IQ/MRCLKcC4HkXxTdfy1PqFlmoXxWqeBa15tujw== + dependencies: + "@aws-sdk/types" "3.709.0" + "@smithy/core" "^2.5.5" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/property-provider" "^3.1.11" + "@smithy/protocol-http" "^4.1.8" + "@smithy/signature-v4" "^4.2.4" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" + "@smithy/util-middleware" "^3.0.11" fast-xml-parser "4.4.1" tslib "^2.6.2" -"@aws-sdk/core@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.679.0.tgz#102aa1d19db5bdcabefc2dcd044f2fb5d0771568" - integrity sha512-CS6PWGX8l4v/xyvX8RtXnBisdCa5+URzKd0L6GvHChype9qKUVxO/Gg6N/y43Hvg7MNWJt9FBPNWIxUB+byJwg== - dependencies: - "@aws-sdk/types" "3.679.0" - "@smithy/core" "^2.4.8" - "@smithy/node-config-provider" "^3.1.8" - "@smithy/property-provider" "^3.1.7" - "@smithy/protocol-http" "^4.1.4" - "@smithy/signature-v4" "^4.2.0" - "@smithy/smithy-client" "^3.4.0" - "@smithy/types" "^3.5.0" - "@smithy/util-middleware" "^3.0.7" - fast-xml-parser "4.4.1" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-env@3.620.1": - version "3.620.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.620.1.tgz#d4692c49a65ebc11dae3f7f8b053fee9268a953c" - integrity sha512-ExuILJ2qLW5ZO+rgkNRj0xiAipKT16Rk77buvPP8csR7kkCflT/gXTyzRe/uzIiETTxM7tr8xuO9MP/DQXqkfg== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/property-provider" "^3.1.3" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-env@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.679.0.tgz#abf297714b77197a9da0d3d95a0f5687ae28e5b3" - integrity sha512-EdlTYbzMm3G7VUNAMxr9S1nC1qUNqhKlAxFU8E7cKsAe8Bp29CD5HAs3POc56AVo9GC4yRIS+/mtlZSmrckzUA== - dependencies: - "@aws-sdk/core" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@smithy/property-provider" "^3.1.7" - "@smithy/types" "^3.5.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-http@3.635.0": - version "3.635.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.635.0.tgz#083439af1336693049958e4b61695e4712b30fd4" - integrity sha512-iJyRgEjOCQlBMXqtwPLIKYc7Bsc6nqjrZybdMDenPDa+kmLg7xh8LxHsu9088e+2/wtLicE34FsJJIfzu3L82g== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/fetch-http-handler" "^3.2.4" - "@smithy/node-http-handler" "^3.1.4" - "@smithy/property-provider" "^3.1.3" - "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - "@smithy/util-stream" "^3.1.3" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-http@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.679.0.tgz#9fc29f4ec7ab52ecf394288c05295823e818d812" - integrity sha512-ZoKLubW5DqqV1/2a3TSn+9sSKg0T8SsYMt1JeirnuLJF0mCoYFUaWMyvxxKuxPoqvUsaycxKru4GkpJ10ltNBw== - dependencies: - "@aws-sdk/core" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@smithy/fetch-http-handler" "^3.2.9" - "@smithy/node-http-handler" "^3.2.4" - "@smithy/property-provider" "^3.1.7" - "@smithy/protocol-http" "^4.1.4" - "@smithy/smithy-client" "^3.4.0" - "@smithy/types" "^3.5.0" - "@smithy/util-stream" "^3.1.9" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-ini@3.637.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.637.0.tgz#dae0d8b05c8b9480da5a92beb4dd244985ecbd70" - integrity sha512-h+PFCWfZ0Q3Dx84SppET/TFpcQHmxFW8/oV9ArEvMilw4EBN+IlxgbL0CnHwjHW64szcmrM0mbebjEfHf4FXmw== - dependencies: - "@aws-sdk/credential-provider-env" "3.620.1" - "@aws-sdk/credential-provider-http" "3.635.0" - "@aws-sdk/credential-provider-process" "3.620.1" - "@aws-sdk/credential-provider-sso" "3.637.0" - "@aws-sdk/credential-provider-web-identity" "3.621.0" - "@aws-sdk/types" "3.609.0" - "@smithy/credential-provider-imds" "^3.2.0" - "@smithy/property-provider" "^3.1.3" - "@smithy/shared-ini-file-loader" "^3.1.4" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-ini@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.679.0.tgz#0115c9e4813de3fcf0bf20f6156b6bf4b62d8431" - integrity sha512-Rg7t8RwUzKcumpipG4neZqaeJ6DF+Bco1+FHn5BZB68jpvwvjBjcQUuWkxj18B6ctYHr1fkunnzeKEn/+vy7+w== - dependencies: - "@aws-sdk/core" "3.679.0" - "@aws-sdk/credential-provider-env" "3.679.0" - "@aws-sdk/credential-provider-http" "3.679.0" - "@aws-sdk/credential-provider-process" "3.679.0" - "@aws-sdk/credential-provider-sso" "3.679.0" - "@aws-sdk/credential-provider-web-identity" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@smithy/credential-provider-imds" "^3.2.4" - "@smithy/property-provider" "^3.1.7" - "@smithy/shared-ini-file-loader" "^3.1.8" - "@smithy/types" "^3.5.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-node@3.637.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.637.0.tgz#0ac6678ab31783adf5b1cf03add5d1da101ea946" - integrity sha512-yoEhoxJJfs7sPVQ6Is939BDQJZpZCoUgKr/ySse4YKOZ24t4VqgHA6+wV7rYh+7IW24Rd91UTvEzSuHYTlxlNA== - dependencies: - "@aws-sdk/credential-provider-env" "3.620.1" - "@aws-sdk/credential-provider-http" "3.635.0" - "@aws-sdk/credential-provider-ini" "3.637.0" - "@aws-sdk/credential-provider-process" "3.620.1" - "@aws-sdk/credential-provider-sso" "3.637.0" - "@aws-sdk/credential-provider-web-identity" "3.621.0" - "@aws-sdk/types" "3.609.0" - "@smithy/credential-provider-imds" "^3.2.0" - "@smithy/property-provider" "^3.1.3" - "@smithy/shared-ini-file-loader" "^3.1.4" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-node@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.679.0.tgz#f3012b7e305aa1151c1472ece3f422f66666bc7c" - integrity sha512-E3lBtaqCte8tWs6Rkssc8sLzvGoJ10TLGvpkijOlz43wPd6xCRh1YLwg6zolf9fVFtEyUs/GsgymiASOyxhFtw== - dependencies: - "@aws-sdk/credential-provider-env" "3.679.0" - "@aws-sdk/credential-provider-http" "3.679.0" - "@aws-sdk/credential-provider-ini" "3.679.0" - "@aws-sdk/credential-provider-process" "3.679.0" - "@aws-sdk/credential-provider-sso" "3.679.0" - "@aws-sdk/credential-provider-web-identity" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@smithy/credential-provider-imds" "^3.2.4" - "@smithy/property-provider" "^3.1.7" - "@smithy/shared-ini-file-loader" "^3.1.8" - "@smithy/types" "^3.5.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-process@3.620.1": - version "3.620.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.620.1.tgz#10387cf85400420bb4bbda9cc56937dcc6d6d0ee" - integrity sha512-hWqFMidqLAkaV9G460+1at6qa9vySbjQKKc04p59OT7lZ5cO5VH5S4aI05e+m4j364MBROjjk2ugNvfNf/8ILg== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/property-provider" "^3.1.3" - "@smithy/shared-ini-file-loader" "^3.1.4" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-process@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.679.0.tgz#a06b5193cdad2c14382708bcd44d487af52b11dc" - integrity sha512-u/p4TV8kQ0zJWDdZD4+vdQFTMhkDEJFws040Gm113VHa/Xo1SYOjbpvqeuFoz6VmM0bLvoOWjxB9MxnSQbwKpQ== +"@aws-sdk/credential-provider-env@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.709.0.tgz#a7f75375d8a413f9ab2bc42f743b943da6d3362d" + integrity sha512-ZMAp9LSikvHDFVa84dKpQmow6wsg956Um20cKuioPpX2GGreJFur7oduD+tRJT6FtIOHn+64YH+0MwiXLhsaIQ== dependencies: - "@aws-sdk/core" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@smithy/property-provider" "^3.1.7" - "@smithy/shared-ini-file-loader" "^3.1.8" - "@smithy/types" "^3.5.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-sso@3.637.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.637.0.tgz#13acf77579df026e89ced33501489defd06a0518" - integrity sha512-Mvz+h+e62/tl+dVikLafhv+qkZJ9RUb8l2YN/LeKMWkxQylPT83CPk9aimVhCV89zth1zpREArl97+3xsfgQvA== - dependencies: - "@aws-sdk/client-sso" "3.637.0" - "@aws-sdk/token-providers" "3.614.0" - "@aws-sdk/types" "3.609.0" - "@smithy/property-provider" "^3.1.3" - "@smithy/shared-ini-file-loader" "^3.1.4" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-sso@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.679.0.tgz#ad07de8f9a0c3e5fe7bd660e1847867643ab480e" - integrity sha512-SAtWonhi9asxn0ukEbcE81jkyanKgqpsrtskvYPpO9Z9KOednM4Cqt6h1bfcS9zaHjN2zu815Gv8O7WiV+F/DQ== - dependencies: - "@aws-sdk/client-sso" "3.679.0" - "@aws-sdk/core" "3.679.0" - "@aws-sdk/token-providers" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@smithy/property-provider" "^3.1.7" - "@smithy/shared-ini-file-loader" "^3.1.8" - "@smithy/types" "^3.5.0" + "@aws-sdk/core" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@smithy/property-provider" "^3.1.11" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/credential-provider-web-identity@3.621.0": - version "3.621.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.621.0.tgz#b25878c0a05dad60cd5f91e7e5a31a145c2f14be" - integrity sha512-w7ASSyfNvcx7+bYGep3VBgC3K6vEdLmlpjT7nSIHxxQf+WSdvy+HynwJosrpZax0sK5q0D1Jpn/5q+r5lwwW6w== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/property-provider" "^3.1.3" - "@smithy/types" "^3.3.0" +"@aws-sdk/credential-provider-http@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.709.0.tgz#a378cbcc4cf373cc277944f1e84e9952f3884f5d" + integrity sha512-lIS7XLwCOyJnLD70f+VIRr8DNV1HPQe9oN6aguYrhoczqz7vDiVZLe3lh714cJqq9rdxzFypK5DqKHmcscMEPQ== + dependencies: + "@aws-sdk/core" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@smithy/fetch-http-handler" "^4.1.2" + "@smithy/node-http-handler" "^3.3.2" + "@smithy/property-provider" "^3.1.11" + "@smithy/protocol-http" "^4.1.8" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" + "@smithy/util-stream" "^3.3.2" tslib "^2.6.2" -"@aws-sdk/credential-provider-web-identity@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.679.0.tgz#5871c44e5846e7c93810fd033224c00493db65a3" - integrity sha512-a74tLccVznXCaBefWPSysUcLXYJiSkeUmQGtalNgJ1vGkE36W5l/8czFiiowdWdKWz7+x6xf0w+Kjkjlj42Ung== - dependencies: - "@aws-sdk/core" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@smithy/property-provider" "^3.1.7" - "@smithy/types" "^3.5.0" +"@aws-sdk/credential-provider-ini@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.709.0.tgz#b01c68d98ce4cc48f79405234e32a9de2f943ea1" + integrity sha512-qCF8IIGcPoUp+Ib3ANhbF5gElxFd+kIrtv2/1tKdvhudMANstQbMiWV0LTH47ZZR6c3as4iSrm09NZnpEoD/pA== + dependencies: + "@aws-sdk/core" "3.709.0" + "@aws-sdk/credential-provider-env" "3.709.0" + "@aws-sdk/credential-provider-http" "3.709.0" + "@aws-sdk/credential-provider-process" "3.709.0" + "@aws-sdk/credential-provider-sso" "3.709.0" + "@aws-sdk/credential-provider-web-identity" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@smithy/credential-provider-imds" "^3.2.8" + "@smithy/property-provider" "^3.1.11" + "@smithy/shared-ini-file-loader" "^3.1.12" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/middleware-host-header@3.620.0": - version "3.620.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.620.0.tgz#b561d419a08a984ba364c193376b482ff5224d74" - integrity sha512-VMtPEZwqYrII/oUkffYsNWY9PZ9xpNJpMgmyU0rlDQ25O1c0Hk3fJmZRe6pEkAJ0omD7kLrqGl1DUjQVxpd/Rg== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/protocol-http" "^4.1.0" - "@smithy/types" "^3.3.0" +"@aws-sdk/credential-provider-node@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.709.0.tgz#270a31aae394e6c8fe7d3fdd0b92e7c3a863b933" + integrity sha512-4HRX9KYWPSjO5O/Vg03YAsebKpvTjTvpK1n7zHYBmlLMBLxUrVsL1nNKKC5p2/7OW3RL8XR1ki3QkoV7kGRxUQ== + dependencies: + "@aws-sdk/credential-provider-env" "3.709.0" + "@aws-sdk/credential-provider-http" "3.709.0" + "@aws-sdk/credential-provider-ini" "3.709.0" + "@aws-sdk/credential-provider-process" "3.709.0" + "@aws-sdk/credential-provider-sso" "3.709.0" + "@aws-sdk/credential-provider-web-identity" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@smithy/credential-provider-imds" "^3.2.8" + "@smithy/property-provider" "^3.1.11" + "@smithy/shared-ini-file-loader" "^3.1.12" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/middleware-host-header@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.679.0.tgz#1eabe42250c57a9e28742dd04786781573faad1a" - integrity sha512-y176HuQ8JRY3hGX8rQzHDSbCl9P5Ny9l16z4xmaiLo+Qfte7ee4Yr3yaAKd7GFoJ3/Mhud2XZ37fR015MfYl2w== +"@aws-sdk/credential-provider-process@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.709.0.tgz#2521f810590f0874c54cc842d3d56f455a728325" + integrity sha512-IAC+jPlGQII6jhIylHOwh3RgSobqlgL59nw2qYTURr8hMCI0Z1p5y2ee646HTVt4WeCYyzUAXfxr6YI/Vitv+Q== dependencies: - "@aws-sdk/types" "3.679.0" - "@smithy/protocol-http" "^4.1.4" - "@smithy/types" "^3.5.0" + "@aws-sdk/core" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@smithy/property-provider" "^3.1.11" + "@smithy/shared-ini-file-loader" "^3.1.12" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/middleware-logger@3.609.0": - version "3.609.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz#ed44d201f091b8bac908cbf14724c7a4d492553f" - integrity sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/types" "^3.3.0" +"@aws-sdk/credential-provider-sso@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.709.0.tgz#f0cb855eed86748ff0c9afa06b3a234fb04b3206" + integrity sha512-rYdTDOxazS2GdGScelsRK5CAkktRLCCdRjlwXaxrcW57j749hEqxcF5uTv9RD6WBwInfedcSywErNZB+hylQlg== + dependencies: + "@aws-sdk/client-sso" "3.709.0" + "@aws-sdk/core" "3.709.0" + "@aws-sdk/token-providers" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@smithy/property-provider" "^3.1.11" + "@smithy/shared-ini-file-loader" "^3.1.12" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/middleware-logger@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.679.0.tgz#cb0f205ddb5341d8327fc9ca1897bf06526c1896" - integrity sha512-0vet8InEj7nvIvGKk+ch7bEF5SyZ7Us9U7YTEgXPrBNStKeRUsgwRm0ijPWWd0a3oz2okaEwXsFl7G/vI0XiEA== +"@aws-sdk/credential-provider-web-identity@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.709.0.tgz#c2b03541cb57ae4c7d6abdca98f99a6a56833ea6" + integrity sha512-2lbDfE0IQ6gma/7BB2JpkjW5G0wGe4AS0x80oybYAYYviJmUtIR3Cn2pXun6bnAWElt4wYKl4su7oC36rs5rNA== dependencies: - "@aws-sdk/types" "3.679.0" - "@smithy/types" "^3.5.0" + "@aws-sdk/core" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@smithy/property-provider" "^3.1.11" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.620.0": - version "3.620.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz#f8270dfff843fd756be971e5673f89c6a24c6513" - integrity sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w== +"@aws-sdk/middleware-host-header@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.709.0.tgz#f44f5c62f9bd7e5a443603fed68143d2d9725219" + integrity sha512-8gQYCYAaIw4lOCd5WYdf15Y/61MgRsAnrb2eiTl+icMlUOOzl8aOl5iDwm/Idp0oHZTflwxM4XSvGXO83PRWcw== dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/protocol-http" "^4.1.0" - "@smithy/types" "^3.3.0" + "@aws-sdk/types" "3.709.0" + "@smithy/protocol-http" "^4.1.8" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.679.0.tgz#3542de5baa466abffbfe5ee485fd87f60d5f917e" - integrity sha512-sQoAZFsQiW/LL3DfKMYwBoGjYDEnMbA9WslWN8xneCmBAwKo6IcSksvYs23PP8XMIoBGe2I2J9BSr654XWygTQ== +"@aws-sdk/middleware-logger@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.709.0.tgz#b9a0b016b7ae09cb502cc4faf45964d4b5745824" + integrity sha512-jDoGSccXv9zebnpUoisjWd5u5ZPIalrmm6TjvPzZ8UqzQt3Beiz0tnQwmxQD6KRc7ADweWP5Ntiqzbw9xpVajg== dependencies: - "@aws-sdk/types" "3.679.0" - "@smithy/protocol-http" "^4.1.4" - "@smithy/types" "^3.5.0" + "@aws-sdk/types" "3.709.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/middleware-user-agent@3.637.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.637.0.tgz#2b00de72b00953a477bcc02a68d8cbb5e9670c44" - integrity sha512-EYo0NE9/da/OY8STDsK2LvM4kNa79DBsf4YVtaG4P5pZ615IeFsD8xOHZeuJmUrSMlVQ8ywPRX7WMucUybsKug== +"@aws-sdk/middleware-recursion-detection@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.709.0.tgz#d7dc253d4858d496caeb12dd6cddd87b250fb98b" + integrity sha512-PObL/wLr4lkfbQ0yXUWaoCWu/jcwfwZzCjsUiXW/H6hW9b/00enZxmx7OhtJYaR6xmh/Lcx5wbhIoDCbzdv0tw== dependencies: - "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" - "@smithy/protocol-http" "^4.1.0" - "@smithy/types" "^3.3.0" + "@aws-sdk/types" "3.709.0" + "@smithy/protocol-http" "^4.1.8" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/middleware-user-agent@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.679.0.tgz#11e410967405139dee2bf69ca728be76f4e617ef" - integrity sha512-4hdeXhPDURPqQLPd9jCpUEo9fQITXl3NM3W1MwcJpE0gdUM36uXkQOYsTPeeU/IRCLVjK8Htlh2oCaM9iJrLCA== - dependencies: - "@aws-sdk/core" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@aws-sdk/util-endpoints" "3.679.0" - "@smithy/core" "^2.4.8" - "@smithy/protocol-http" "^4.1.4" - "@smithy/types" "^3.5.0" - tslib "^2.6.2" - -"@aws-sdk/region-config-resolver@3.614.0": - version "3.614.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.614.0.tgz#9cebb31a5bcfea2a41891fff7f28d0164cde179a" - integrity sha512-vDCeMXvic/LU0KFIUjpC3RiSTIkkvESsEfbVHiHH0YINfl8HnEqR5rj+L8+phsCeVg2+LmYwYxd5NRz4PHxt5g== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/types" "^3.3.0" - "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.3" +"@aws-sdk/middleware-user-agent@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.709.0.tgz#2a467f14b3f4a9270bcdfde32e3d4e38701aaafe" + integrity sha512-ooc9ZJvgkjPhi9q05XwSfNTXkEBEIfL4hleo5rQBKwHG3aTHvwOM7LLzhdX56QZVa6sorPBp6fwULuRDSqiQHw== + dependencies: + "@aws-sdk/core" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@aws-sdk/util-endpoints" "3.709.0" + "@smithy/core" "^2.5.5" + "@smithy/protocol-http" "^4.1.8" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/region-config-resolver@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.679.0.tgz#d205dbaea8385aaf05e637fb7cb095c60bc708be" - integrity sha512-Ybx54P8Tg6KKq5ck7uwdjiKif7n/8g1x+V0V9uTjBjRWqaIgiqzXwKWoPj6NCNkE7tJNtqI4JrNxp/3S3HvmRw== +"@aws-sdk/region-config-resolver@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.709.0.tgz#64547b333842e5804e1793e4d6d29578c0b34a68" + integrity sha512-/NoCAMEVKAg3kBKOrNtgOfL+ECt6nrl+L7q2SyYmrcY4tVCmwuECVqewQaHc03fTnJijfKLccw0Fj+6wOCnB6w== dependencies: - "@aws-sdk/types" "3.679.0" - "@smithy/node-config-provider" "^3.1.8" - "@smithy/types" "^3.5.0" + "@aws-sdk/types" "3.709.0" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/types" "^3.7.2" "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.7" - tslib "^2.6.2" - -"@aws-sdk/token-providers@3.614.0": - version "3.614.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.614.0.tgz#88da04f6d4ce916b0b0f6e045676d04201fb47fd" - integrity sha512-okItqyY6L9IHdxqs+Z116y5/nda7rHxLvROxtAJdLavWTYDydxrZstImNgGWTeVdmc0xX2gJCI77UYUTQWnhRw== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/property-provider" "^3.1.3" - "@smithy/shared-ini-file-loader" "^3.1.4" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@aws-sdk/token-providers@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.679.0.tgz#7ec462d93941dd3cfdc245104ad32971f6ebc4f6" - integrity sha512-1/+Zso/x2jqgutKixYFQEGli0FELTgah6bm7aB+m2FAWH4Hz7+iMUsazg6nSWm714sG9G3h5u42Dmpvi9X6/hA== - dependencies: - "@aws-sdk/types" "3.679.0" - "@smithy/property-provider" "^3.1.7" - "@smithy/shared-ini-file-loader" "^3.1.8" - "@smithy/types" "^3.5.0" - tslib "^2.6.2" - -"@aws-sdk/types@3.609.0": - version "3.609.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.609.0.tgz#06b39d799c9f197a7b43670243e8e78a3bf7d6a5" - integrity sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q== - dependencies: - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@aws-sdk/types@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.679.0.tgz#3737bb0f190add9e788b838a24cd5d8106dbed4f" - integrity sha512-NwVq8YvInxQdJ47+zz4fH3BRRLC6lL+WLkvr242PVBbUOLRyK/lkwHlfiKUoeVIMyK5NF+up6TRg71t/8Bny6Q== - dependencies: - "@smithy/types" "^3.5.0" + "@smithy/util-middleware" "^3.0.11" tslib "^2.6.2" -"@aws-sdk/types@^3.222.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.577.0.tgz#7700784d368ce386745f8c340d9d68cea4716f90" - integrity sha512-FT2JZES3wBKN/alfmhlo+3ZOq/XJ0C7QOZcDNrpKjB0kqYoKjhVKZ/Hx6ArR0czkKfHzBBEs6y40ebIHx2nSmA== +"@aws-sdk/token-providers@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.709.0.tgz#56305ab187660a711fd172c329dc953ca754fa80" + integrity sha512-q5Ar6k71nci43IbULFgC8a89d/3EHpmd7HvBzqVGRcHnoPwh8eZDBfbBXKH83NGwcS1qPSRYiDbVfeWPm4/1jA== dependencies: - "@smithy/types" "^3.0.0" + "@aws-sdk/types" "3.709.0" + "@smithy/property-provider" "^3.1.11" + "@smithy/shared-ini-file-loader" "^3.1.12" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/util-endpoints@3.637.0": - version "3.637.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.637.0.tgz#e20bcb69028039fdbc06e98a3028c7f8d8e8adaa" - integrity sha512-pAqOKUHeVWHEXXDIp/qoMk/6jyxIb6GGjnK1/f8dKHtKIEs4tKsnnL563gceEvdad53OPXIt86uoevCcCzmBnw== +"@aws-sdk/types@3.709.0", "@aws-sdk/types@^3.222.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.709.0.tgz#f8d7ab07e253d3ed0e3b360e09fc67c7430a73b9" + integrity sha512-ArtLTMxgjf13Kfu3gWH3Ez9Q5TkDdcRZUofpKH3pMGB/C6KAbeSCtIIDKfoRTUABzyGlPyCrZdnFjKyH+ypIpg== dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/types" "^3.3.0" - "@smithy/util-endpoints" "^2.0.5" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/util-endpoints@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.679.0.tgz#b249ad8b4289e634cb5dfb3873a70b7aecbf323f" - integrity sha512-YL6s4Y/1zC45OvddvgE139fjeWSKKPgLlnfrvhVL7alNyY9n7beR4uhoDpNrt5mI6sn9qiBF17790o+xLAXjjg== +"@aws-sdk/util-endpoints@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.709.0.tgz#32dfe339d78b699ada68392bbb3bec25441bae5c" + integrity sha512-Mbc7AtL5WGCTKC16IGeUTz+sjpC3ptBda2t0CcK0kMVw3THDdcSq6ZlNKO747cNqdbwUvW34oHteUiHv4/z88Q== dependencies: - "@aws-sdk/types" "3.679.0" - "@smithy/types" "^3.5.0" - "@smithy/util-endpoints" "^2.1.3" + "@aws-sdk/types" "3.709.0" + "@smithy/types" "^3.7.2" + "@smithy/util-endpoints" "^2.1.7" tslib "^2.6.2" "@aws-sdk/util-locate-window@^3.0.0": - version "3.568.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-locate-window/-/util-locate-window-3.568.0.tgz#2acc4b2236af0d7494f7e517401ba6b3c4af11ff" - integrity sha512-3nh4TINkXYr+H41QaPelCceEB2FXP3fxp93YZXB/kqJvX0U9j0N0Uk45gvsjmEPzG8XxkPEeLIfT2I1M7A6Lig== + version "3.693.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-locate-window/-/util-locate-window-3.693.0.tgz#1160f6d055cf074ca198eb8ecf89b6311537ad6c" + integrity sha512-ttrag6haJLWABhLqtg1Uf+4LgHWIMOVSYL+VYZmAp2v4PUGOwWmWQH0Zk8RM7YuQcLfH/EoR72/Yxz6A4FKcuw== dependencies: tslib "^2.6.2" -"@aws-sdk/util-user-agent-browser@3.609.0": - version "3.609.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.609.0.tgz#aa15421b2e32ae8bc589dac2bd6e8969832ce588" - integrity sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA== - dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/types" "^3.3.0" - bowser "^2.11.0" - tslib "^2.6.2" - -"@aws-sdk/util-user-agent-browser@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.679.0.tgz#bbaa5a8771c8a16388cd3cd934bb84a641ce907d" - integrity sha512-CusSm2bTBG1kFypcsqU8COhnYc6zltobsqs3nRrvYqYaOqtMnuE46K4XTWpnzKgwDejgZGOE+WYyprtAxrPvmQ== +"@aws-sdk/util-user-agent-browser@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.709.0.tgz#ad6e867bdd348923ec10ddd6c37740ce0986cd8f" + integrity sha512-/rL2GasJzdTWUURCQKFldw2wqBtY4k4kCiA2tVZSKg3y4Ey7zO34SW8ebaeCE2/xoWOyLR2/etdKyphoo4Zrtg== dependencies: - "@aws-sdk/types" "3.679.0" - "@smithy/types" "^3.5.0" + "@aws-sdk/types" "3.709.0" + "@smithy/types" "^3.7.2" bowser "^2.11.0" tslib "^2.6.2" -"@aws-sdk/util-user-agent-node@3.614.0": - version "3.614.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.614.0.tgz#1e3f49a80f841a3f21647baed2adce01aac5beb5" - integrity sha512-15ElZT88peoHnq5TEoEtZwoXTXRxNrk60TZNdpl/TUBJ5oNJ9Dqb5Z4ryb8ofN6nm9aFf59GVAerFDz8iUoHBA== +"@aws-sdk/util-user-agent-node@3.709.0": + version "3.709.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.709.0.tgz#7ff5a508bcad49963a550acadcced43d7af9960d" + integrity sha512-trBfzSCVWy7ILgqhEXgiuM7hfRCw4F4a8IK90tjk9YL0jgoJ6eJuOp7+DfCtHJaygoBxD3cdMFkOu+lluFmGBA== dependencies: - "@aws-sdk/types" "3.609.0" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/types" "^3.3.0" + "@aws-sdk/middleware-user-agent" "3.709.0" + "@aws-sdk/types" "3.709.0" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@aws-sdk/util-user-agent-node@3.679.0": - version "3.679.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.679.0.tgz#0d1cd6eba18bfe6d0106d78fc7aa9b74889c462b" - integrity sha512-Bw4uXZ+NU5ed6TNfo4tBbhBSW+2eQxXYjYBGl5gLUNUpg2pDFToQAP6rXBFiwcG52V2ny5oLGiD82SoYuYkAVg== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== dependencies: - "@aws-sdk/middleware-user-agent" "3.679.0" - "@aws-sdk/types" "3.679.0" - "@smithy/node-config-provider" "^3.1.8" - "@smithy/types" "^3.5.0" - tslib "^2.6.2" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" - integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== - dependencies: - "@babel/highlight" "^7.24.7" + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/generator@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.0.tgz#f858ddfa984350bc3d3b7f125073c9af6988f18e" - integrity sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw== +"@babel/generator@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" + integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== dependencies: - "@babel/types" "^7.25.0" + "@babel/parser" "^7.26.3" + "@babel/types" "^7.26.3" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" - jsesc "^2.5.1" + jsesc "^3.0.2" "@babel/helper-module-imports@^7.16.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" - integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== - dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-string-parser@^7.24.8": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" - integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== - -"@babel/helper-validator-identifier@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" - integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== - -"@babel/highlight@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" - integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== - dependencies: - "@babel/helper-validator-identifier" "^7.24.7" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" - -"@babel/parser@^7.20.15": - version "7.24.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.6.tgz#5e030f440c3c6c78d195528c3b688b101a365328" - integrity sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q== + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715" + integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== + dependencies: + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" -"@babel/parser@^7.24.4": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.8.tgz#58a4dbbcad7eb1d48930524a3fd93d93e9084c6f" - integrity sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w== +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== -"@babel/parser@^7.25.0", "@babel/parser@^7.25.3": - version "7.25.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" - integrity sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw== - dependencies: - "@babel/types" "^7.25.2" +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== -"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.0.tgz#3af9a91c1b739c569d5d80cc917280919c544ecb" - integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw== +"@babel/parser@^7.20.15", "@babel/parser@^7.25.4", "@babel/parser@^7.25.9", "@babel/parser@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" + integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== dependencies: - regenerator-runtime "^0.14.0" + "@babel/types" "^7.26.3" -"@babel/runtime@^7.13.10": - version "7.24.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.6.tgz#5b76eb89ad45e2e4a0a8db54c456251469a3358e" - integrity sha512-Ja18XcETdEl5mzzACGd+DKgaGJzPTCow7EglgwTmHdwokzDFYh/MHua6lU6DV/hjF2IaOJ4oX2nqnjG7RElKOw== +"@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.18.3": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" - integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/parser" "^7.25.0" - "@babel/types" "^7.25.0" - -"@babel/traverse@^7.24.7": - version "7.25.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.3.tgz#f1b901951c83eda2f3e29450ce92743783373490" - integrity sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.25.0" - "@babel/parser" "^7.25.3" - "@babel/template" "^7.25.0" - "@babel/types" "^7.25.2" +"@babel/template@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" + integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== + dependencies: + "@babel/code-frame" "^7.25.9" + "@babel/parser" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/traverse@^7.25.9": + version "7.26.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd" + integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.3" + "@babel/parser" "^7.26.3" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.3" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.24.0": - version "7.24.9" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.9.tgz#228ce953d7b0d16646e755acf204f4cf3d08cc73" - integrity sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ== - dependencies: - "@babel/helper-string-parser" "^7.24.8" - "@babel/helper-validator-identifier" "^7.24.7" - to-fast-properties "^2.0.0" - -"@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2": - version "7.25.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.2.tgz#55fb231f7dc958cd69ea141a4c2997e819646125" - integrity sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q== +"@babel/types@^7.25.4", "@babel/types@^7.25.9", "@babel/types@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" + integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== dependencies: - "@babel/helper-string-parser" "^7.24.8" - "@babel/helper-validator-identifier" "^7.24.7" - to-fast-properties "^2.0.0" + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" "@bcoe/v8-coverage@^0.2.3": version "0.2.3" @@ -1007,58 +571,58 @@ integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@biomejs/biome@^1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.9.2.tgz#297a6a0172e46124b9b6058ec3875091d352a0be" - integrity sha512-4j2Gfwft8Jqp1X0qLYvK4TEy4xhTo4o6rlvJPsjPeEame8gsmbGQfOPBkw7ur+7/Z/f0HZmCZKqbMvR7vTXQYQ== + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.9.4.tgz#89766281cbc3a0aae865a7ff13d6aaffea2842bf" + integrity sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog== optionalDependencies: - "@biomejs/cli-darwin-arm64" "1.9.2" - "@biomejs/cli-darwin-x64" "1.9.2" - "@biomejs/cli-linux-arm64" "1.9.2" - "@biomejs/cli-linux-arm64-musl" "1.9.2" - "@biomejs/cli-linux-x64" "1.9.2" - "@biomejs/cli-linux-x64-musl" "1.9.2" - "@biomejs/cli-win32-arm64" "1.9.2" - "@biomejs/cli-win32-x64" "1.9.2" - -"@biomejs/cli-darwin-arm64@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.2.tgz#9303e426156189b2ab469154f7cd94ecfbf8bd5e" - integrity sha512-rbs9uJHFmhqB3Td0Ro+1wmeZOHhAPTL3WHr8NtaVczUmDhXkRDWScaxicG9+vhSLj1iLrW47itiK6xiIJy6vaA== - -"@biomejs/cli-darwin-x64@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.2.tgz#a674e61c04b5aeca31b5b1e7f7b678937a6e90ac" - integrity sha512-BlfULKijNaMigQ9GH9fqJVt+3JTDOSiZeWOQtG/1S1sa8Lp046JHG3wRJVOvekTPL9q/CNFW1NVG8J0JN+L1OA== - -"@biomejs/cli-linux-arm64-musl@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.2.tgz#b126b0093a7b7632c01a948bf7a0feaf5040ea76" - integrity sha512-ZATvbUWhNxegSALUnCKWqetTZqrK72r2RsFD19OK5jXDj/7o1hzI1KzDNG78LloZxftrwr3uI9SqCLh06shSZw== - -"@biomejs/cli-linux-arm64@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.2.tgz#c71b4aa374fcd32d3f1a9e7c8a6ce3090e9b6be4" - integrity sha512-T8TJuSxuBDeQCQzxZu2o3OU4eyLumTofhCxxFd3+aH2AEWVMnH7Z/c3QP1lHI5RRMBP9xIJeMORqDQ5j+gVZzw== - -"@biomejs/cli-linux-x64-musl@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.2.tgz#5fce02295b435362aa75044ddc388547fbbbbb19" - integrity sha512-CjPM6jT1miV5pry9C7qv8YJk0FIZvZd86QRD3atvDgfgeh9WQU0k2Aoo0xUcPdTnoz0WNwRtDicHxwik63MmSg== - -"@biomejs/cli-linux-x64@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.2.tgz#17d7bac0b6ebb20b9fb18812d4ef390f5855858f" - integrity sha512-T0cPk3C3Jr2pVlsuQVTBqk2qPjTm8cYcTD9p/wmR9MeVqui1C/xTVfOIwd3miRODFMrJaVQ8MYSXnVIhV9jTjg== - -"@biomejs/cli-win32-arm64@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.2.tgz#725734c4dc35cdcad3ef5cbcd85c6ff1238afa46" - integrity sha512-2x7gSty75bNIeD23ZRPXyox6Z/V0M71ObeJtvQBhi1fgrvPdtkEuw7/0wEHg6buNCubzOFuN9WYJm6FKoUHfhg== - -"@biomejs/cli-win32-x64@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.2.tgz#6f506d604d3349c1ba674d46cb96540c00a2ba83" - integrity sha512-JC3XvdYcjmu1FmAehVwVV0SebLpeNTnO2ZaMdGCSOdS7f8O9Fq14T2P1gTG1Q29Q8Dt1S03hh0IdVpIZykOL8g== + "@biomejs/cli-darwin-arm64" "1.9.4" + "@biomejs/cli-darwin-x64" "1.9.4" + "@biomejs/cli-linux-arm64" "1.9.4" + "@biomejs/cli-linux-arm64-musl" "1.9.4" + "@biomejs/cli-linux-x64" "1.9.4" + "@biomejs/cli-linux-x64-musl" "1.9.4" + "@biomejs/cli-win32-arm64" "1.9.4" + "@biomejs/cli-win32-x64" "1.9.4" + +"@biomejs/cli-darwin-arm64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.4.tgz#dfa376d23a54a2d8f17133c92f23c1bf2e62509f" + integrity sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw== + +"@biomejs/cli-darwin-x64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.4.tgz#eafc2ce3849d385fc02238aad1ca4a73395a64d9" + integrity sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg== + +"@biomejs/cli-linux-arm64-musl@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.4.tgz#d780c3e01758fc90f3268357e3f19163d1f84fca" + integrity sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA== + +"@biomejs/cli-linux-arm64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.4.tgz#8ed1dd0e89419a4b66a47f95aefb8c46ae6041c9" + integrity sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g== + +"@biomejs/cli-linux-x64-musl@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.4.tgz#f36982b966bd671a36671e1de4417963d7db15fb" + integrity sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg== + +"@biomejs/cli-linux-x64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.4.tgz#a0a7f56680c76b8034ddc149dbf398bdd3a462e8" + integrity sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg== + +"@biomejs/cli-win32-arm64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.4.tgz#e2ef4e0084e76b7e26f0fc887c5ef1265ea56200" + integrity sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg== + +"@biomejs/cli-win32-x64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz#4c7afa90e3970213599b4095e62f87e5972b2340" + integrity sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA== "@blocto/sdk@0.10.2": version "0.10.2" @@ -1132,10 +696,10 @@ preact "^10.16.0" sha.js "^2.4.11" -"@coinbase/wallet-sdk@4.2.3": - version "4.2.3" - resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-4.2.3.tgz#a30fa0605b24bc42c37f52a62d2442bcbb7734af" - integrity sha512-BcyHZ/Ec84z0emORzqdXDv4P0oV+tV3a0OirfA8Ko1JGBIAVvB+hzLvZzCDvnuZx7MTK+Dd8Y9Tjlo446BpCIg== +"@coinbase/wallet-sdk@4.2.4": + version "4.2.4" + resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-4.2.4.tgz#aff3a95f50f9a26950052b53620828414bd2baab" + integrity sha512-wJ9QOXOhRdGermKAoJSr4JgGqZm/Um0m+ecywzEC9qSOu3TXuVcG3k0XXTXW11UBgjdoPRuf5kAwRX3T9BynFA== dependencies: "@noble/hashes" "^1.4.0" clsx "^1.2.1" @@ -1171,10 +735,15 @@ enabled "2.0.x" kuler "^2.0.0" -"@datadog/native-appsec@8.1.1": - version "8.1.1" - resolved "https://registry.yarnpkg.com/@datadog/native-appsec/-/native-appsec-8.1.1.tgz#76aa34697e6ecbd3d9ef7e6938d3cdcfa689b1f3" - integrity sha512-mf+Ym/AzET4FeUTXOs8hz0uLOSsVIUnavZPUx8YoKWK5lKgR2L+CLfEzOpjBwgFpDgbV8I1/vyoGelgGpsMKHA== +"@datadog/libdatadog@^0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@datadog/libdatadog/-/libdatadog-0.2.2.tgz#ac02c76ac9a38250dca740727c7cdf00244ce3d3" + integrity sha512-rTWo96mEPTY5UbtGoFj8/wY0uKSViJhsPg/Z6aoFWBFXQ8b45Ix2e/yvf92AAwrhG+gPLTxEqTXh3kef2dP8Ow== + +"@datadog/native-appsec@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@datadog/native-appsec/-/native-appsec-8.3.0.tgz#91afd89d18d386be4da8a1b0e04500f2f8b5eb66" + integrity sha512-RYHbSJ/MwJcJaLzaCaZvUyNLUKFbMshayIiv4ckpFpQJDiq1T8t9iM2k7008s75g1vRuXfsRNX7MaLn4aoFuWA== dependencies: node-gyp-build "^3.9.0" @@ -1186,25 +755,25 @@ lru-cache "^7.14.0" node-gyp-build "^4.5.0" -"@datadog/native-iast-taint-tracking@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@datadog/native-iast-taint-tracking/-/native-iast-taint-tracking-3.1.0.tgz#7b2ed7f8fad212d65e5ab03bcdea8b42a3051b2e" - integrity sha512-rw6qSjmxmu1yFHVvZLXFt/rVq2tUZXocNogPLB8n7MPpA0jijNGb109WokWw5ITImiW91GcGDuBW6elJDVKouQ== +"@datadog/native-iast-taint-tracking@3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@datadog/native-iast-taint-tracking/-/native-iast-taint-tracking-3.2.0.tgz#9fb6823d82f934e12c06ea1baa7399ca80deb2ec" + integrity sha512-Mc6FzCoyvU5yXLMsMS9yKnEqJMWoImAukJXolNWCTm+JQYCMf2yMsJ8pBAm7KyZKliamM9rCn7h7Tr2H3lXwjA== dependencies: node-gyp-build "^3.9.0" -"@datadog/native-metrics@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@datadog/native-metrics/-/native-metrics-2.0.0.tgz#65bf03313ee419956361e097551db36173e85712" - integrity sha512-YklGVwUtmKGYqFf1MNZuOHvTYdKuR4+Af1XkWcMD8BwOAjxmd9Z+97328rCOY8TFUJzlGUPaXzB8j2qgG/BMwA== +"@datadog/native-metrics@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@datadog/native-metrics/-/native-metrics-3.0.1.tgz#dc276c93785c0377a048e316f23b7c8ff3acfa84" + integrity sha512-0GuMyYyXf+Qpb/F+Fcekz58f2mO37lit9U3jMbWY/m8kac44gCPABzL5q3gWbdH+hWgqYfQoEYsdNDGSrKfwoQ== dependencies: node-addon-api "^6.1.0" node-gyp-build "^3.9.0" -"@datadog/pprof@5.3.0": - version "5.3.0" - resolved "https://registry.yarnpkg.com/@datadog/pprof/-/pprof-5.3.0.tgz#c2f58d328ecced7f99887f1a559d7fe3aecb9219" - integrity sha512-53z2Q3K92T6Pf4vz4Ezh8kfkVEvLzbnVqacZGgcbkP//q0joFzO8q00Etw1S6NdnCX0XmX08ULaF4rUI5r14mw== +"@datadog/pprof@5.4.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@datadog/pprof/-/pprof-5.4.1.tgz#08c9bcf5d8efb2eeafdfc9f5bb5402f79fb41266" + integrity sha512-IvpL96e/cuh8ugP5O8Czdup7XQOLHeIDgM5pac5W7Lc1YzGe5zTtebKFpitvb1CPw1YY+1qFx0pWGgKP2kOfHg== dependencies: delay "^5.0.0" node-gyp-build "<4.0" @@ -1217,16 +786,16 @@ resolved "https://registry.yarnpkg.com/@datadog/sketches-js/-/sketches-js-2.1.1.tgz#9ec2251b3c932b4f43e1d164461fa6cb6f28b7d0" integrity sha512-d5RjycE+MObE/hU+8OM5Zp4VjTwiPLRa8299fj7muOmR16fb942z8byoMbCErnGh0lBevvgkGrLclQDvINbIyg== -"@emotion/babel-plugin@^11.11.0", "@emotion/babel-plugin@^11.12.0": - version "11.12.0" - resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.12.0.tgz#7b43debb250c313101b3f885eba634f1d723fcc2" - integrity sha512-y2WQb+oP8Jqvvclh8Q55gLUyb7UFvgv7eJfsj7td5TToBrIUtPay2kMrZi4xjq9qw2vD0ZR5fSho0yqoFgX7Rw== +"@emotion/babel-plugin@^11.11.0", "@emotion/babel-plugin@^11.13.5": + version "11.13.5" + resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz#eab8d65dbded74e0ecfd28dc218e75607c4e7bc0" + integrity sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ== dependencies: "@babel/helper-module-imports" "^7.16.7" "@babel/runtime" "^7.18.3" "@emotion/hash" "^0.9.2" "@emotion/memoize" "^0.9.0" - "@emotion/serialize" "^1.2.0" + "@emotion/serialize" "^1.3.3" babel-plugin-macros "^3.1.0" convert-source-map "^1.5.0" escape-string-regexp "^4.0.0" @@ -1234,14 +803,14 @@ source-map "^0.5.7" stylis "4.2.0" -"@emotion/cache@^11.11.0", "@emotion/cache@^11.13.0": - version "11.13.1" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.13.1.tgz#fecfc54d51810beebf05bf2a161271a1a91895d7" - integrity sha512-iqouYkuEblRcXmylXIwwOodiEK5Ifl7JcX7o6V4jI3iW4mLXX3dmt5xwBtIkJiQEXFAI+pC8X0i67yiPkH9Ucw== +"@emotion/cache@^11.11.0", "@emotion/cache@^11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.14.0.tgz#ee44b26986eeb93c8be82bb92f1f7a9b21b2ed76" + integrity sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA== dependencies: "@emotion/memoize" "^0.9.0" "@emotion/sheet" "^1.4.0" - "@emotion/utils" "^1.4.0" + "@emotion/utils" "^1.4.2" "@emotion/weak-memoize" "^0.4.0" stylis "4.2.0" @@ -1250,25 +819,13 @@ resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.2.tgz#ff9221b9f58b4dfe61e619a7788734bd63f6898b" integrity sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g== -"@emotion/is-prop-valid@^1.2.1": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz#d4175076679c6a26faa92b03bb786f9e52612337" - integrity sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw== - dependencies: - "@emotion/memoize" "^0.8.1" - -"@emotion/is-prop-valid@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.3.0.tgz#bd84ba972195e8a2d42462387581560ef780e4e2" - integrity sha512-SHetuSLvJDzuNbOdtPVbq6yMMMlLoW5Q94uDqJZqy50gcmAjxFkVqmzqSGEFq9gT2iMuIeKV1PXVWmvUhuZLlQ== +"@emotion/is-prop-valid@^1.2.1", "@emotion/is-prop-valid@^1.3.0": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz#8d5cf1132f836d7adbe42cf0b49df7816fc88240" + integrity sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw== dependencies: "@emotion/memoize" "^0.9.0" -"@emotion/memoize@^0.8.1": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17" - integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== - "@emotion/memoize@^0.9.0": version "0.9.0" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.9.0.tgz#745969d649977776b43fc7648c556aaa462b4102" @@ -1288,40 +845,29 @@ "@emotion/weak-memoize" "^0.3.1" hoist-non-react-statics "^3.3.1" -"@emotion/react@11.13.3": - version "11.13.3" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.13.3.tgz#a69d0de2a23f5b48e0acf210416638010e4bd2e4" - integrity sha512-lIsdU6JNrmYfJ5EbUCf4xW1ovy5wKQ2CkPRM4xogziOxH1nXxBSjpC9YqbFAP7circxMfYp+6x676BqWcEiixg== +"@emotion/react@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.14.0.tgz#cfaae35ebc67dd9ef4ea2e9acc6cd29e157dd05d" + integrity sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA== dependencies: "@babel/runtime" "^7.18.3" - "@emotion/babel-plugin" "^11.12.0" - "@emotion/cache" "^11.13.0" - "@emotion/serialize" "^1.3.1" - "@emotion/use-insertion-effect-with-fallbacks" "^1.1.0" - "@emotion/utils" "^1.4.0" + "@emotion/babel-plugin" "^11.13.5" + "@emotion/cache" "^11.14.0" + "@emotion/serialize" "^1.3.3" + "@emotion/use-insertion-effect-with-fallbacks" "^1.2.0" + "@emotion/utils" "^1.4.2" "@emotion/weak-memoize" "^0.4.0" hoist-non-react-statics "^3.3.1" -"@emotion/serialize@^1.1.2", "@emotion/serialize@^1.1.3", "@emotion/serialize@^1.2.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.3.0.tgz#e07cadfc967a4e7816e0c3ffaff4c6ce05cb598d" - integrity sha512-jACuBa9SlYajnpIVXB+XOXnfJHyckDfe6fOpORIM6yhBDlqGuExvDdZYHDQGoDf3bZXGv7tNr+LpLjJqiEQ6EA== - dependencies: - "@emotion/hash" "^0.9.2" - "@emotion/memoize" "^0.9.0" - "@emotion/unitless" "^0.9.0" - "@emotion/utils" "^1.4.0" - csstype "^3.0.2" - -"@emotion/serialize@^1.3.0", "@emotion/serialize@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.3.1.tgz#490b660178f43d2de8e92b278b51079d726c05c3" - integrity sha512-dEPNKzBPU+vFPGa+z3axPRn8XVDetYORmDC0wAiej+TNcOZE70ZMJa0X7JdeoM6q/nWTMZeLpN/fTnD9o8MQBA== +"@emotion/serialize@^1.1.2", "@emotion/serialize@^1.1.3", "@emotion/serialize@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.3.3.tgz#d291531005f17d704d0463a032fe679f376509e8" + integrity sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA== dependencies: "@emotion/hash" "^0.9.2" "@emotion/memoize" "^0.9.0" "@emotion/unitless" "^0.10.0" - "@emotion/utils" "^1.4.0" + "@emotion/utils" "^1.4.2" csstype "^3.0.2" "@emotion/sheet@^1.4.0": @@ -1341,37 +887,32 @@ "@emotion/use-insertion-effect-with-fallbacks" "^1.0.1" "@emotion/utils" "^1.2.1" -"@emotion/styled@11.13.0": - version "11.13.0" - resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.13.0.tgz#633fd700db701472c7a5dbef54d6f9834e9fb190" - integrity sha512-tkzkY7nQhW/zC4hztlwucpT8QEZ6eUzpXDRhww/Eej4tFfO0FxQYWRyg/c5CCXa4d/f174kqeXYjuQRnhzf6dA== +"@emotion/styled@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.14.0.tgz#f47ca7219b1a295186d7661583376fcea95f0ff3" + integrity sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA== dependencies: "@babel/runtime" "^7.18.3" - "@emotion/babel-plugin" "^11.12.0" + "@emotion/babel-plugin" "^11.13.5" "@emotion/is-prop-valid" "^1.3.0" - "@emotion/serialize" "^1.3.0" - "@emotion/use-insertion-effect-with-fallbacks" "^1.1.0" - "@emotion/utils" "^1.4.0" + "@emotion/serialize" "^1.3.3" + "@emotion/use-insertion-effect-with-fallbacks" "^1.2.0" + "@emotion/utils" "^1.4.2" "@emotion/unitless@^0.10.0": version "0.10.0" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.10.0.tgz#2af2f7c7e5150f497bdabd848ce7b218a27cf745" integrity sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg== -"@emotion/unitless@^0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.9.0.tgz#8e5548f072bd67b8271877e51c0f95c76a66cbe2" - integrity sha512-TP6GgNZtmtFaFcsOgExdnfxLLpRDla4Q66tnenA9CktvVSdNKDvMVuUah4QvWPIpNjrWsGg3qeGo9a43QooGZQ== - -"@emotion/use-insertion-effect-with-fallbacks@^1.0.1", "@emotion/use-insertion-effect-with-fallbacks@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.1.0.tgz#1a818a0b2c481efba0cf34e5ab1e0cb2dcb9dfaf" - integrity sha512-+wBOcIV5snwGgI2ya3u99D7/FJquOIniQT1IKyDsBmEgwvpxMNeS65Oib7OnE2d2aY+3BU4OiH+0Wchf8yk3Hw== +"@emotion/use-insertion-effect-with-fallbacks@^1.0.1", "@emotion/use-insertion-effect-with-fallbacks@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz#8a8cb77b590e09affb960f4ff1e9a89e532738bf" + integrity sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg== -"@emotion/utils@^1.2.1", "@emotion/utils@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.4.0.tgz#262f1d02aaedb2ec91c83a0955dd47822ad5fbdd" - integrity sha512-spEnrA1b6hDR/C68lC2M7m6ALPUHZC0lIY7jAS/B/9DuuO1ZP04eov8SMv/6fwRd8pzmsn2AuJEznRREWlQrlQ== +"@emotion/utils@^1.2.1", "@emotion/utils@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.4.2.tgz#6df6c45881fcb1c412d6688a311a98b7f59c1b52" + integrity sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA== "@emotion/weak-memoize@^0.3.1": version "0.3.1" @@ -1498,11 +1039,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== -"@eth-optimism/contracts-bedrock@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@eth-optimism/contracts-bedrock/-/contracts-bedrock-0.17.2.tgz#501ae26c7fe4ef4edf6420c384f76677e85f62ae" - integrity sha512-YVwPHpBZgFwFX9qY8+iToVAAH7mSnVIVmih+YfHhqjAhlLvLZfYjvj+hRNgcB9eRyl1SOOB0jevp4JOOV1v2BA== - "@eth-optimism/contracts@0.6.0": version "0.6.0" resolved "https://registry.yarnpkg.com/@eth-optimism/contracts/-/contracts-0.6.0.tgz#15ae76222a9b4d958a550cafb1960923af613a31" @@ -1534,7 +1070,7 @@ bufio "^1.0.7" chai "^4.3.4" -"@eth-optimism/core-utils@0.13.2": +"@eth-optimism/core-utils@^0.13.2": version "0.13.2" resolved "https://registry.yarnpkg.com/@eth-optimism/core-utils/-/core-utils-0.13.2.tgz#c0187c3abf6d86dad039edf04ff81299253214fe" integrity sha512-u7TOKm1RxH1V5zw7dHmfy91bOuEAZU68LT/9vJPkuWEjaTl+BgvPDRDTurjzclHzN0GbWdcpOqPZg4ftjkJGaw== @@ -1554,14 +1090,13 @@ ethers "^5.7.2" node-fetch "^2.6.7" -"@eth-optimism/sdk@3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@eth-optimism/sdk/-/sdk-3.3.0.tgz#c7a3af4e7b5ab541be0c4e2acd02f2bf84bfb2e5" - integrity sha512-0Wt9roWe3itdzp08caCQLoFqhmT47ssquKAzBe7yXI6saVL+f2vWl6VgEaq0aYe2FsWvD9L0tSAJHLx1FiquNw== +"@eth-optimism/sdk@3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@eth-optimism/sdk/-/sdk-3.3.2.tgz#68a5f6e77f9c85f6eeb9db8044b3b69199520eb0" + integrity sha512-+zhxT0YkBIEzHsuIayQGjr8g9NawZo6/HYfzg1NSEFsE2Yt0NyCWqVDFTuuak0T6AvIa2kNcl3r0Z8drdb2QmQ== dependencies: "@eth-optimism/contracts" "0.6.0" - "@eth-optimism/contracts-bedrock" "0.17.2" - "@eth-optimism/core-utils" "0.13.2" + "@eth-optimism/core-utils" "^0.13.2" lodash "^4.17.21" merkletreejs "^0.3.11" rlp "^2.2.7" @@ -2295,18 +1830,18 @@ integrity sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ== "@fastify/ajv-compiler@^3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@fastify/ajv-compiler/-/ajv-compiler-3.5.0.tgz#459bff00fefbf86c96ec30e62e933d2379e46670" - integrity sha512-ebbEtlI7dxXF5ziNdr05mOY8NnDiPB1XvAlLHctRt/Rc+C3LCOVW5imUVX+mhvUhnNzmPBHewUkOFgGlCxgdAA== + version "3.6.0" + resolved "https://registry.yarnpkg.com/@fastify/ajv-compiler/-/ajv-compiler-3.6.0.tgz#907497a0e62a42b106ce16e279cf5788848e8e79" + integrity sha512-LwdXQJjmMD+GwLOkP7TVC68qa+pSSogeWWmznRJ/coyTcfe9qA05AHFSe1eZFwK6q+xVRpChnvFUkf1iYaSZsQ== dependencies: ajv "^8.11.0" ajv-formats "^2.1.1" fast-uri "^2.0.0" "@fastify/cookie@^9.3.1": - version "9.3.1" - resolved "https://registry.yarnpkg.com/@fastify/cookie/-/cookie-9.3.1.tgz#48b89a356a23860c666e2fe522a084cc5c943d33" - integrity sha512-h1NAEhB266+ZbZ0e9qUE6NnNR07i7DnNXWG9VbbZ8uC6O/hxHpl+Zoe5sw1yfdZ2U6XhToUGDnzQtWJdCaPwfg== + version "9.4.0" + resolved "https://registry.yarnpkg.com/@fastify/cookie/-/cookie-9.4.0.tgz#1be3bff03dbe746d3bbddbf31a37354076a190c1" + integrity sha512-Th+pt3kEkh4MQD/Q2q1bMuJIB5NX/D5SwSpOKu3G/tjoGbwfpurIMJsWSPS0SJJ4eyjtmQ8OipDQspf8RbUOlg== dependencies: cookie-signature "^1.1.0" fastify-plugin "^4.0.0" @@ -2386,31 +1921,31 @@ ws "^8.0.0" "@floating-ui/core@^1.6.0": - version "1.6.7" - resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.7.tgz#7602367795a390ff0662efd1c7ae8ca74e75fb12" - integrity sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g== + version "1.6.8" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.8.tgz#aa43561be075815879305965020f492cdb43da12" + integrity sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA== dependencies: - "@floating-ui/utils" "^0.2.7" + "@floating-ui/utils" "^0.2.8" "@floating-ui/dom@^1.0.0": - version "1.6.10" - resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.10.tgz#b74c32f34a50336c86dcf1f1c845cf3a39e26d6f" - integrity sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A== + version "1.6.12" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.12.tgz#6333dcb5a8ead3b2bf82f33d6bc410e95f54e556" + integrity sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w== dependencies: "@floating-ui/core" "^1.6.0" - "@floating-ui/utils" "^0.2.7" + "@floating-ui/utils" "^0.2.8" "@floating-ui/react-dom@^2.0.0": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.1.tgz#cca58b6b04fc92b4c39288252e285e0422291fb0" - integrity sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg== + version "2.1.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.2.tgz#a1349bbf6a0e5cb5ded55d023766f20a4d439a31" + integrity sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A== dependencies: "@floating-ui/dom" "^1.0.0" -"@floating-ui/utils@^0.2.7": - version "0.2.7" - resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.7.tgz#d0ece53ce99ab5a8e37ebdfe5e32452a2bfc073e" - integrity sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA== +"@floating-ui/utils@^0.2.8": + version "0.2.8" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.8.tgz#21a907684723bbbaa5f0974cf7730bd797eb8e62" + integrity sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig== "@google-cloud/kms@3.0.1": version "3.0.1" @@ -2427,9 +1962,9 @@ google-gax "^3.5.8" "@google-cloud/kms@^4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@google-cloud/kms/-/kms-4.4.0.tgz#8f3586e0d24bfa44378b9b1f26a14283c7e2c468" - integrity sha512-ZS2IOouhNThDYdHQjH7JO9DfqLlfhxsXs/z1Pwzb9vsw+In0RbsyxtVZc/s7n+Qp09MZ+e4kfrR9YiRn6TyT9w== + version "4.5.0" + resolved "https://registry.yarnpkg.com/@google-cloud/kms/-/kms-4.5.0.tgz#c3336a13e54559cbe40e42ab803cc6cefc2aa3c7" + integrity sha512-i2vC0DI7bdfEhQszqASTw0KVvbB7HsO2CwTBod423NawAu7FWi+gVVa7NLfXVNGJaZZayFfci2Hu+om/HmyEjQ== dependencies: google-gax "^4.0.3" @@ -2441,10 +1976,10 @@ lit "^2.2.3" three "^0.146.0" -"@grpc/grpc-js@>=1.8.22", "@grpc/grpc-js@~1.10.3", "@grpc/grpc-js@~1.8.0": - version "1.12.2" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.12.2.tgz#97eda82dd49bb9c24eaf6434ea8d7de446e95aac" - integrity sha512-bgxdZmgTrJZX50OjyVwz3+mNEnCTNkh3cIqGPWVNeW9jX6bn1ZkU80uPd+67/ZpIJIjRQ9qaHCjhavyoWYxumg== +"@grpc/grpc-js@>=1.8.22", "@grpc/grpc-js@^1.10.9", "@grpc/grpc-js@~1.8.0": + version "1.12.4" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.12.4.tgz#3208808435ebf1e495f9a5c5c5a0bc3dc8c9e891" + integrity sha512-NBhrxEWnFh0FxeA0d//YP95lRFsSx2TNLEUQg4/W+5f/BMxcCjgOOIT24iD+ZB/tZw057j44DaIxja7w4XMrhg== dependencies: "@grpc/proto-loader" "^0.7.13" "@js-sdsl/ordered-map" "^4.4.2" @@ -2483,15 +2018,20 @@ dependencies: minipass "^7.0.4" +"@isaacs/ttlcache@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2" + integrity sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA== + "@istanbuljs/schema@^0.1.2": version "0.1.3" resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== "@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + version "0.3.8" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" + integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== dependencies: "@jridgewell/set-array" "^1.2.1" "@jridgewell/sourcemap-codec" "^1.4.10" @@ -2507,12 +2047,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== @@ -2656,11 +2191,11 @@ "@metamask/utils" "^8.3.0" "@metamask/rpc-errors@^6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-6.2.1.tgz#f5daf429ededa7cb83069dc621bd5738fe2a1d80" - integrity sha512-VTgWkjWLzb0nupkFl1duQi9Mk8TGT9rsdnQg6DeRrYEFxtFOh0IF8nAwxM/4GWqDl6uIB06lqUBgUrAVWl62Bw== + version "6.4.0" + resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-6.4.0.tgz#a7ce01c06c9a347ab853e55818ac5654a73bd006" + integrity sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg== dependencies: - "@metamask/utils" "^8.3.0" + "@metamask/utils" "^9.0.0" fast-safe-stringify "^2.0.6" "@metamask/safe-event-emitter@^2.0.0": @@ -2669,9 +2204,14 @@ integrity sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q== "@metamask/safe-event-emitter@^3.0.0": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.1.tgz#e89b840a7af8097a8ed4953d8dc8470d1302d3ef" - integrity sha512-ihb3B0T/wJm1eUuArYP4lCTSEoZsClHhuWyfo/kMX3m/odpqNcPfsz5O2A3NT7dXCAgWPGDQGPqygCpgeniKMw== + version "3.1.2" + resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.2.tgz#bfac8c7a1a149b5bbfe98f59fbfea512dfa3bad4" + integrity sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA== + +"@metamask/superstruct@^3.0.0", "@metamask/superstruct@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@metamask/superstruct/-/superstruct-3.1.0.tgz#148f786a674fba3ac885c1093ab718515bf7f648" + integrity sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA== "@metamask/utils@^5.0.1": version "5.0.2" @@ -2685,18 +2225,33 @@ superstruct "^1.0.3" "@metamask/utils@^8.3.0": - version "8.4.0" - resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-8.4.0.tgz#f44812c96467a4e1b70b2edff6ee89a9caa4e354" - integrity sha512-dbIc3C7alOe0agCuBHM1h71UaEaEqOk2W8rAtEn8QGz4haH2Qq7MoK6i7v2guzvkJVVh79c+QCzIqphC3KvrJg== + version "8.5.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-8.5.0.tgz#ddd0d4012d5191809404c97648a837ea9962cceb" + integrity sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ== dependencies: "@ethereumjs/tx" "^4.2.0" + "@metamask/superstruct" "^3.0.0" + "@noble/hashes" "^1.3.1" + "@scure/base" "^1.1.3" + "@types/debug" "^4.1.7" + debug "^4.3.4" + pony-cause "^2.1.10" + semver "^7.5.4" + uuid "^9.0.1" + +"@metamask/utils@^9.0.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.3.0.tgz#4726bd7f5d6a43ea8425b6d663ab9207f617c2d1" + integrity sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g== + dependencies: + "@ethereumjs/tx" "^4.2.0" + "@metamask/superstruct" "^3.1.0" "@noble/hashes" "^1.3.1" "@scure/base" "^1.1.3" "@types/debug" "^4.1.7" debug "^4.3.4" pony-cause "^2.1.10" semver "^7.5.4" - superstruct "^1.0.3" uuid "^9.0.1" "@motionone/animation@^10.15.1", "@motionone/animation@^10.18.0": @@ -2768,35 +2323,35 @@ "@motionone/dom" "^10.16.4" tslib "^2.3.1" -"@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.2.tgz#44d752c1a2dc113f15f781b7cc4f53a307e3fa38" - integrity sha512-9bfjwDxIDWmmOKusUcqdS4Rw+SETlp9Dy39Xui9BEGEk19dDwH0jhipwFzEff/pFg95NKymc6TOTbRKcWeRqyQ== +"@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz#9edec61b22c3082018a79f6d1c30289ddf3d9d11" + integrity sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw== -"@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.2.tgz#f954f34355712212a8e06c465bc06c40852c6bb3" - integrity sha512-lwriRAHm1Yg4iDf23Oxm9n/t5Zpw1lVnxYU3HnJPTi2lJRkKTrps1KVgvL6m7WvmhYVt/FIsssWay+k45QHeuw== +"@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz#33677a275204898ad8acbf62734fc4dc0b6a4855" + integrity sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw== -"@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.2.tgz#45c63037f045c2b15c44f80f0393fa24f9655367" - integrity sha512-FU20Bo66/f7He9Fp9sP2zaJ1Q8L9uLPZQDub/WlUip78JlPeMbVL8546HbZfcW9LNciEXc8d+tThSJjSC+tmsg== +"@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz#19edf7cdc2e7063ee328403c1d895a86dd28f4bb" + integrity sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg== -"@msgpackr-extract/msgpackr-extract-linux-arm@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.2.tgz#35707efeafe6d22b3f373caf9e8775e8920d1399" - integrity sha512-MOI9Dlfrpi2Cuc7i5dXdxPbFIgbDBGgKR5F2yWEa6FVEtSWncfVNKW5AKjImAQ6CZlBK9tympdsZJ2xThBiWWA== +"@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz#94fb0543ba2e28766c3fc439cabbe0440ae70159" + integrity sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw== -"@msgpackr-extract/msgpackr-extract-linux-x64@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.2.tgz#091b1218b66c341f532611477ef89e83f25fae4f" - integrity sha512-gsWNDCklNy7Ajk0vBBf9jEx04RUxuDQfBse918Ww+Qb9HCPoGzS+XJTLe96iN3BVK7grnLiYghP/M4L8VsaHeA== +"@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz#4a0609ab5fe44d07c9c60a11e4484d3c38bbd6e3" + integrity sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg== -"@msgpackr-extract/msgpackr-extract-win32-x64@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.2.tgz#0f164b726869f71da3c594171df5ebc1c4b0a407" - integrity sha512-O+6Gs8UeDbyFpbSh2CPEz/UOrrdWPTBYNblZK5CxxLisYt4kGX3Sc+czffFonyjiGSq3jWLwJS/CCJc7tBr4sQ== +"@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz#0aa5502d547b57abfc4ac492de68e2006e417242" + integrity sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ== "@multiformats/base-x@^4.0.1": version "4.0.1" @@ -2810,13 +2365,6 @@ dependencies: "@noble/hashes" "1.3.2" -"@noble/curves@1.3.0", "@noble/curves@~1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e" - integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA== - dependencies: - "@noble/hashes" "1.3.3" - "@noble/curves@1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" @@ -2824,21 +2372,14 @@ dependencies: "@noble/hashes" "1.4.0" -"@noble/curves@1.6.0", "@noble/curves@~1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b" - integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== - dependencies: - "@noble/hashes" "1.5.0" - -"@noble/curves@^1.4.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.5.0.tgz#7a9b9b507065d516e6dce275a1e31db8d2a100dd" - integrity sha512-J5EKamIHnKPyClwVrzmaf5wSdQXgdHcPZIZLu3bwnbeCx8/7NPK5q2ZBWF+5FvYGByjiQQsJYX6jfgB2wDPn3A== +"@noble/curves@1.4.2", "@noble/curves@~1.4.0": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.2.tgz#40309198c76ed71bc6dbf7ba24e81ceb4d0d1fe9" + integrity sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw== dependencies: "@noble/hashes" "1.4.0" -"@noble/curves@^1.6.0", "@noble/curves@~1.7.0": +"@noble/curves@1.7.0", "@noble/curves@^1.4.0", "@noble/curves@^1.6.0", "@noble/curves@~1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.7.0.tgz#0512360622439256df892f21d25b388f52505e45" integrity sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw== @@ -2850,31 +2391,26 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== -"@noble/hashes@1.3.3", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.2": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" - integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== - -"@noble/hashes@1.4.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0": +"@noble/hashes@1.4.0", "@noble/hashes@~1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== -"@noble/hashes@1.5.0", "@noble/hashes@~1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" - integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== - "@noble/hashes@1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.0.tgz#d4bfb516ad6e7b5111c216a5cc7075f4cf19e6c5" integrity sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ== -"@noble/hashes@^1.5.0", "@noble/hashes@~1.6.0": +"@noble/hashes@1.6.1", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0", "@noble/hashes@^1.5.0", "@noble/hashes@~1.6.0": version "1.6.1" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== +"@noble/hashes@~1.3.0", "@noble/hashes@~1.3.2": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" + integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== + "@node-lightning/checksum@^0.27.0": version "0.27.4" resolved "https://registry.yarnpkg.com/@node-lightning/checksum/-/checksum-0.27.4.tgz#493004e76aa76cdbab46f01bf445e4010c30a179" @@ -2891,16 +2427,16 @@ integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== "@opentelemetry/core@^1.14.0": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.1.tgz#ff667d939d128adfc7c793edae2f6bca177f829d" - integrity sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ== + version "1.29.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.29.0.tgz#a9397dfd9a8b37b2435b5e44be16d39ec1c82bd9" + integrity sha512-gmT7vAreXl0DTHD2rVZcw3+l2g84+5XiHIqdBUxXbExymPCvSsGOpiwMmn8nkiJur28STV31wnhIDrzWDPzjfA== dependencies: - "@opentelemetry/semantic-conventions" "1.25.1" + "@opentelemetry/semantic-conventions" "1.28.0" -"@opentelemetry/semantic-conventions@1.25.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz#0deecb386197c5e9c2c28f2f89f51fb8ae9f145e" - integrity sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ== +"@opentelemetry/semantic-conventions@1.28.0": + version "1.28.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz#337fb2bca0453d0726696e745f50064411f646d6" + integrity sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA== "@openzeppelin/contracts-upgradeable@^4.4.2", "@openzeppelin/contracts-upgradeable@^4.9.3": version "4.9.6" @@ -2928,97 +2464,103 @@ resolved "https://registry.yarnpkg.com/@paperxyz/sdk-common-utilities/-/sdk-common-utilities-0.1.1.tgz#dfddaf8880c82bd665368793ebe4d06a365bede7" integrity sha512-RefjXB3d5Ub1I3GoIf/mfgTsvmAneWoeQwpmiuXYx1NmmSdbtBxDUk4POtSWUCnvoiJP0Y2frATnYMV30J1b1A== -"@parcel/watcher-android-arm64@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz#c2c19a3c442313ff007d2d7a9c2c1dd3e1c9ca84" - integrity sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg== +"@parcel/watcher-android-arm64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.0.tgz#e32d3dda6647791ee930556aee206fcd5ea0fb7a" + integrity sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ== -"@parcel/watcher-darwin-arm64@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz#c817c7a3b4f3a79c1535bfe54a1c2818d9ffdc34" - integrity sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA== +"@parcel/watcher-darwin-arm64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.0.tgz#0d9e680b7e9ec1c8f54944f1b945aa8755afb12f" + integrity sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw== -"@parcel/watcher-darwin-x64@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz#1a3f69d9323eae4f1c61a5f480a59c478d2cb020" - integrity sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg== +"@parcel/watcher-darwin-x64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.0.tgz#f9f1d5ce9d5878d344f14ef1856b7a830c59d1bb" + integrity sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA== -"@parcel/watcher-freebsd-x64@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz#0d67fef1609f90ba6a8a662bc76a55fc93706fc8" - integrity sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w== +"@parcel/watcher-freebsd-x64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.0.tgz#2b77f0c82d19e84ff4c21de6da7f7d096b1a7e82" + integrity sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw== -"@parcel/watcher-linux-arm-glibc@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz#ce5b340da5829b8e546bd00f752ae5292e1c702d" - integrity sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA== +"@parcel/watcher-linux-arm-glibc@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.0.tgz#92ed322c56dbafa3d2545dcf2803334aee131e42" + integrity sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA== -"@parcel/watcher-linux-arm64-glibc@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz#6d7c00dde6d40608f9554e73998db11b2b1ff7c7" - integrity sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA== +"@parcel/watcher-linux-arm-musl@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.0.tgz#cd48e9bfde0cdbbd2ecd9accfc52967e22f849a4" + integrity sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA== -"@parcel/watcher-linux-arm64-musl@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.1.tgz#bd39bc71015f08a4a31a47cd89c236b9d6a7f635" - integrity sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA== +"@parcel/watcher-linux-arm64-glibc@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.0.tgz#7b81f6d5a442bb89fbabaf6c13573e94a46feb03" + integrity sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA== -"@parcel/watcher-linux-x64-glibc@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz#0ce29966b082fb6cdd3de44f2f74057eef2c9e39" - integrity sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg== +"@parcel/watcher-linux-arm64-musl@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.0.tgz#dcb8ff01077cdf59a18d9e0a4dff7a0cfe5fd732" + integrity sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q== -"@parcel/watcher-linux-x64-musl@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz#d2ebbf60e407170bb647cd6e447f4f2bab19ad16" - integrity sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ== +"@parcel/watcher-linux-x64-glibc@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.0.tgz#2e254600fda4e32d83942384d1106e1eed84494d" + integrity sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw== + +"@parcel/watcher-linux-x64-musl@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.0.tgz#01fcea60fedbb3225af808d3f0a7b11229792eef" + integrity sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA== "@parcel/watcher-wasm@^2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz#c4353e4fdb96ee14389856f7f6f6d21b7dcef9e1" - integrity sha512-/ZR0RxqxU/xxDGzbzosMjh4W6NdYFMqq2nvo2b8SLi7rsl/4jkL8S5stIikorNkdR50oVDvqb/3JT05WM+CRRA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-wasm/-/watcher-wasm-2.5.0.tgz#81fad1e10957f08a532eb4fc0d4c353cd8901a50" + integrity sha512-Z4ouuR8Pfggk1EYYbTaIoxc+Yv4o7cGQnH0Xy8+pQ+HbiW+ZnwhcD2LPf/prfq1nIWpAxjOkQ8uSMFWMtBLiVQ== dependencies: is-glob "^4.0.3" micromatch "^4.0.5" napi-wasm "^1.1.0" -"@parcel/watcher-win32-arm64@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz#eb4deef37e80f0b5e2f215dd6d7a6d40a85f8adc" - integrity sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg== +"@parcel/watcher-win32-arm64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.0.tgz#87cdb16e0783e770197e52fb1dc027bb0c847154" + integrity sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig== -"@parcel/watcher-win32-ia32@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz#94fbd4b497be39fd5c8c71ba05436927842c9df7" - integrity sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw== +"@parcel/watcher-win32-ia32@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.0.tgz#778c39b56da33e045ba21c678c31a9f9d7c6b220" + integrity sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA== -"@parcel/watcher-win32-x64@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz#4bf920912f67cae5f2d264f58df81abfea68dadf" - integrity sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A== +"@parcel/watcher-win32-x64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.0.tgz#33873876d0bbc588aacce38e90d1d7480ce81cb7" + integrity sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw== "@parcel/watcher@^2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.4.1.tgz#a50275151a1bb110879c6123589dba90c19f1bf8" - integrity sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.5.0.tgz#5c88818b12b8de4307a9d3e6dc3e28eba0dfbd10" + integrity sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ== dependencies: detect-libc "^1.0.3" is-glob "^4.0.3" micromatch "^4.0.5" node-addon-api "^7.0.0" optionalDependencies: - "@parcel/watcher-android-arm64" "2.4.1" - "@parcel/watcher-darwin-arm64" "2.4.1" - "@parcel/watcher-darwin-x64" "2.4.1" - "@parcel/watcher-freebsd-x64" "2.4.1" - "@parcel/watcher-linux-arm-glibc" "2.4.1" - "@parcel/watcher-linux-arm64-glibc" "2.4.1" - "@parcel/watcher-linux-arm64-musl" "2.4.1" - "@parcel/watcher-linux-x64-glibc" "2.4.1" - "@parcel/watcher-linux-x64-musl" "2.4.1" - "@parcel/watcher-win32-arm64" "2.4.1" - "@parcel/watcher-win32-ia32" "2.4.1" - "@parcel/watcher-win32-x64" "2.4.1" + "@parcel/watcher-android-arm64" "2.5.0" + "@parcel/watcher-darwin-arm64" "2.5.0" + "@parcel/watcher-darwin-x64" "2.5.0" + "@parcel/watcher-freebsd-x64" "2.5.0" + "@parcel/watcher-linux-arm-glibc" "2.5.0" + "@parcel/watcher-linux-arm-musl" "2.5.0" + "@parcel/watcher-linux-arm64-glibc" "2.5.0" + "@parcel/watcher-linux-arm64-musl" "2.5.0" + "@parcel/watcher-linux-x64-glibc" "2.5.0" + "@parcel/watcher-linux-x64-musl" "2.5.0" + "@parcel/watcher-win32-arm64" "2.5.0" + "@parcel/watcher-win32-ia32" "2.5.0" + "@parcel/watcher-win32-x64" "2.5.0" "@passwordless-id/webauthn@^1.6.1": version "1.6.2" @@ -3045,41 +2587,41 @@ resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.17.0.tgz#9079947bd749689c2dabfb9ecc70a24ebefb1f43" integrity sha512-N2tnyKayT0Zf7mHjwEyE8iG7FwTmXDHFZ1GnNhQp0pJUObsuel4ZZ1XwfuAYkq5mRIiC/Kot0kt0tGCfLJ70Jw== -"@prisma/debug@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.17.0.tgz#a765105848993984535b6066f8ebc6e6ead26533" - integrity sha512-l7+AteR3P8FXiYyo496zkuoiJ5r9jLQEdUuxIxNCN1ud8rdbH3GTxm+f+dCyaSv9l9WY+29L9czaVRXz9mULfg== +"@prisma/debug@5.22.0": + version "5.22.0" + resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.22.0.tgz#58af56ed7f6f313df9fb1042b6224d3174bbf412" + integrity sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ== -"@prisma/engines-version@5.17.0-31.393aa359c9ad4a4bb28630fb5613f9c281cde053": - version "5.17.0-31.393aa359c9ad4a4bb28630fb5613f9c281cde053" - resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.17.0-31.393aa359c9ad4a4bb28630fb5613f9c281cde053.tgz#3c7cc1ef3ebc34cbd069e5873b9982f2aabf5acd" - integrity sha512-tUuxZZysZDcrk5oaNOdrBnnkoTtmNQPkzINFDjz7eG6vcs9AVDmA/F6K5Plsb2aQc/l5M2EnFqn3htng9FA4hg== +"@prisma/engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2": + version "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2" + resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2.tgz#d534dd7235c1ba5a23bacd5b92cc0ca3894c28f4" + integrity sha512-2PTmxFR2yHW/eB3uqWtcgRcgAbG1rwG9ZriSvQw+nnb7c4uCr3RAcGMb6/zfE88SKlC1Nj2ziUvc96Z379mHgQ== -"@prisma/engines@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.17.0.tgz#74dd1aabb22675892760b3cf69a448e3aef4616b" - integrity sha512-+r+Nf+JP210Jur+/X8SIPLtz+uW9YA4QO5IXA+KcSOBe/shT47bCcRMTYCbOESw3FFYFTwe7vU6KTWHKPiwvtg== +"@prisma/engines@5.22.0": + version "5.22.0" + resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.22.0.tgz#28f3f52a2812c990a8b66eb93a0987816a5b6d84" + integrity sha512-UNjfslWhAt06kVL3CjkuYpHAWSO6L4kDCVPegV6itt7nD1kSJavd3vhgAEhjglLJJKEdJ7oIqDJ+yHk6qO8gPA== dependencies: - "@prisma/debug" "5.17.0" - "@prisma/engines-version" "5.17.0-31.393aa359c9ad4a4bb28630fb5613f9c281cde053" - "@prisma/fetch-engine" "5.17.0" - "@prisma/get-platform" "5.17.0" + "@prisma/debug" "5.22.0" + "@prisma/engines-version" "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2" + "@prisma/fetch-engine" "5.22.0" + "@prisma/get-platform" "5.22.0" -"@prisma/fetch-engine@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.17.0.tgz#f718dc7426411d1ebeeee53e2d0d38652387f87c" - integrity sha512-ESxiOaHuC488ilLPnrv/tM2KrPhQB5TRris/IeIV4ZvUuKeaicCl4Xj/JCQeG9IlxqOgf1cCg5h5vAzlewN91Q== +"@prisma/fetch-engine@5.22.0": + version "5.22.0" + resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.22.0.tgz#4fb691b483a450c5548aac2f837b267dd50ef52e" + integrity sha512-bkrD/Mc2fSvkQBV5EpoFcZ87AvOgDxbG99488a5cexp5Ccny+UM6MAe/UFkUC0wLYD9+9befNOqGiIJhhq+HbA== dependencies: - "@prisma/debug" "5.17.0" - "@prisma/engines-version" "5.17.0-31.393aa359c9ad4a4bb28630fb5613f9c281cde053" - "@prisma/get-platform" "5.17.0" + "@prisma/debug" "5.22.0" + "@prisma/engines-version" "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2" + "@prisma/get-platform" "5.22.0" -"@prisma/get-platform@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.17.0.tgz#89fdcae2adddebbbf0e7bd0474a6c49d6023519b" - integrity sha512-UlDgbRozCP1rfJ5Tlkf3Cnftb6srGrEQ4Nm3og+1Se2gWmCZ0hmPIi+tQikGDUVLlvOWx3Gyi9LzgRP+HTXV9w== +"@prisma/get-platform@5.22.0": + version "5.22.0" + resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.22.0.tgz#fc675bc9d12614ca2dade0506c9c4a77e7dddacd" + integrity sha512-pHhpQdr1UPFpt+zFfnPazhulaZYCUqeIcPpJViYoq9R+D/yw4fjE+CtnsnKzPYm0ddUbeXUzjGVGIRVgPDCk4Q== dependencies: - "@prisma/debug" "5.17.0" + "@prisma/debug" "5.22.0" "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -3554,111 +3096,116 @@ resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.1.0.tgz#f817d1d3265ac5415dadc67edab30ae196696438" integrity sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg== -"@rollup/rollup-android-arm-eabi@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz#e3c9cc13f144ba033df4d2c3130a214dc8e3473e" - integrity sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw== - -"@rollup/rollup-android-arm64@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz#0474250fcb5871aca952e249a0c3270fc4310b55" - integrity sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA== - -"@rollup/rollup-darwin-arm64@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz#77c29b4f9c430c1624f1a6835f2a7e82be3d16f2" - integrity sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q== - -"@rollup/rollup-darwin-x64@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz#7d87711f641a458868758cbf110fb32eabd6a25a" - integrity sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ== - -"@rollup/rollup-freebsd-arm64@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz#662f808d2780e4e91021ac9ee7ed800862bb9a57" - integrity sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw== - -"@rollup/rollup-freebsd-x64@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz#71e5a7bcfcbe51d8b65d158675acec1307edea79" - integrity sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA== - -"@rollup/rollup-linux-arm-gnueabihf@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz#08f67fcec61ee18f8b33b3f403a834ab8f3aa75d" - integrity sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w== - -"@rollup/rollup-linux-arm-musleabihf@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz#2e1ad4607f86475b1731556359c6070eb8f4b109" - integrity sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A== - -"@rollup/rollup-linux-arm64-gnu@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz#c65d559dcb0d3dabea500cf7b8215959ae6cccf8" - integrity sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg== - -"@rollup/rollup-linux-arm64-musl@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz#6739f7eb33e20466bb88748519c98ce8dee23922" - integrity sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA== - -"@rollup/rollup-linux-powerpc64le-gnu@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz#8d9fe9471c256e55278cb1f7b1c977cd8fe6df20" - integrity sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ== - -"@rollup/rollup-linux-riscv64-gnu@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz#9a467f7ad5b61c9d66b24e79a3c57cb755d02c35" - integrity sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw== - -"@rollup/rollup-linux-s390x-gnu@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz#efaddf22df27b87a267a731fbeb9539e92cd4527" - integrity sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg== - -"@rollup/rollup-linux-x64-gnu@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz#a959eccb04b07fd1591d7ff745a6865faa7042cd" - integrity sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q== - -"@rollup/rollup-linux-x64-musl@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz#927764f1da1f2dd50943716dec93796d10cb6e99" - integrity sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw== - -"@rollup/rollup-win32-arm64-msvc@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz#030b6cc607d845da23dced624e47fb45de105840" - integrity sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A== - -"@rollup/rollup-win32-ia32-msvc@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz#3457a3f44a84f51d8097c3606429e01f0d2d0ec2" - integrity sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ== - -"@rollup/rollup-win32-x64-msvc@4.27.4": - version "4.27.4" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz#67d516613c9f2fe42e2d8b78e252d0003179d92c" - integrity sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug== +"@rollup/rollup-android-arm-eabi@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz#7f4c4d8cd5ccab6e95d6750dbe00321c1f30791e" + integrity sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ== -"@safe-global/safe-core-sdk-types@^1.9.2": - version "1.10.1" - resolved "https://registry.yarnpkg.com/@safe-global/safe-core-sdk-types/-/safe-core-sdk-types-1.10.1.tgz#94331b982671d2f2b8cc23114c58baf63d460c81" - integrity sha512-BKvuYTLOlY16Rq6qCXglmnL6KxInDuXMFqZMaCzwDKiEh+uoHu3xCumG5tVtWOkCgBF4XEZXMqwZUiLcon7IsA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/contracts" "^5.7.0" - "@safe-global/safe-deployments" "^1.20.2" - web3-core "^1.8.1" - web3-utils "^1.8.1" +"@rollup/rollup-android-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz#17ea71695fb1518c2c324badbe431a0bd1879f2d" + integrity sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA== -"@safe-global/safe-core-sdk-utils@^1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@safe-global/safe-core-sdk-utils/-/safe-core-sdk-utils-1.7.4.tgz#810d36cf9629129a28eb1b9c6e690b163834b572" - integrity sha512-ITocwSWlFUA1K9VMP/eJiMfgbP/I9qDxAaFz7ukj5N5NZD3ihVQZkmqML6hjse5UhrfjCnfIEcLkNZhtB2XC2Q== +"@rollup/rollup-darwin-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz#dac0f0d0cfa73e7d5225ae6d303c13c8979e7999" + integrity sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ== + +"@rollup/rollup-darwin-x64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz#8f63baa1d31784904a380d2e293fa1ddf53dd4a2" + integrity sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ== + +"@rollup/rollup-freebsd-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz#30ed247e0df6e8858cdc6ae4090e12dbeb8ce946" + integrity sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA== + +"@rollup/rollup-freebsd-x64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz#57846f382fddbb508412ae07855b8a04c8f56282" + integrity sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ== + +"@rollup/rollup-linux-arm-gnueabihf@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz#378ca666c9dae5e6f94d1d351e7497c176e9b6df" + integrity sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA== + +"@rollup/rollup-linux-arm-musleabihf@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz#a692eff3bab330d5c33a5d5813a090c15374cddb" + integrity sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg== + +"@rollup/rollup-linux-arm64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz#6b1719b76088da5ac1ae1feccf48c5926b9e3db9" + integrity sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA== + +"@rollup/rollup-linux-arm64-musl@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz#865baf5b6f5ff67acb32e5a359508828e8dc5788" + integrity sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A== + +"@rollup/rollup-linux-loongarch64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz#23c6609ba0f7fa7a7f2038b6b6a08555a5055a87" + integrity sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz#652ef0d9334a9f25b9daf85731242801cb0fc41c" + integrity sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A== + +"@rollup/rollup-linux-riscv64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz#1eb6651839ee6ebca64d6cc64febbd299e95e6bd" + integrity sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA== + +"@rollup/rollup-linux-s390x-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz#015c52293afb3ff2a293cf0936b1d43975c1e9cd" + integrity sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg== + +"@rollup/rollup-linux-x64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz#b83001b5abed2bcb5e2dbeec6a7e69b194235c1e" + integrity sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw== + +"@rollup/rollup-linux-x64-musl@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz#6cc7c84cd4563737f8593e66f33b57d8e228805b" + integrity sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g== + +"@rollup/rollup-win32-arm64-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz#631ffeee094d71279fcd1fe8072bdcf25311bc11" + integrity sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A== + +"@rollup/rollup-win32-ia32-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz#06d1d60d5b9f718e8a6c4a43f82e3f9e3254587f" + integrity sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA== + +"@rollup/rollup-win32-x64-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz#4dff5c4259ebe6c5b4a8f2c5bc3829b7a8447ff0" + integrity sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA== + +"@safe-global/safe-core-sdk-types@^1.9.2": + version "1.10.1" + resolved "https://registry.yarnpkg.com/@safe-global/safe-core-sdk-types/-/safe-core-sdk-types-1.10.1.tgz#94331b982671d2f2b8cc23114c58baf63d460c81" + integrity sha512-BKvuYTLOlY16Rq6qCXglmnL6KxInDuXMFqZMaCzwDKiEh+uoHu3xCumG5tVtWOkCgBF4XEZXMqwZUiLcon7IsA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/contracts" "^5.7.0" + "@safe-global/safe-deployments" "^1.20.2" + web3-core "^1.8.1" + web3-utils "^1.8.1" + +"@safe-global/safe-core-sdk-utils@^1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@safe-global/safe-core-sdk-utils/-/safe-core-sdk-utils-1.7.4.tgz#810d36cf9629129a28eb1b9c6e690b163834b572" + integrity sha512-ITocwSWlFUA1K9VMP/eJiMfgbP/I9qDxAaFz7ukj5N5NZD3ihVQZkmqML6hjse5UhrfjCnfIEcLkNZhtB2XC2Q== dependencies: "@safe-global/safe-core-sdk-types" "^1.9.2" semver "^7.3.8" @@ -3679,11 +3226,11 @@ zksync-web3 "^0.14.3" "@safe-global/safe-deployments@^1.20.2", "@safe-global/safe-deployments@^1.25.0": - version "1.36.0" - resolved "https://registry.yarnpkg.com/@safe-global/safe-deployments/-/safe-deployments-1.36.0.tgz#7e5cd470cc1042182d47f65b59831a64ed8feff1" - integrity sha512-9MbDJveRR64AbmzjIpuUqmDBDtOZpXpvkyhTUs+5UOPT3WgSO375/ZTO7hZpywP7+EmxnjkGc9EoxjGcC4TAyw== + version "1.37.21" + resolved "https://registry.yarnpkg.com/@safe-global/safe-deployments/-/safe-deployments-1.37.21.tgz#9b194c08a5605bb012d0bc321a74d322d107e361" + integrity sha512-Q5qvcxXjAIcKOO8e3uQ/iNOSE5vRI+5jCO6JW/id5tEwMBtfyj5Ec2Vkk6nz0AM0uo2pyGROYjNTTuefoTthvQ== dependencies: - semver "^7.6.0" + semver "^7.6.2" "@safe-global/safe-ethers-adapters@0.1.0-alpha.19": version "0.1.0-alpha.19" @@ -3704,26 +3251,16 @@ "@safe-global/safe-core-sdk-utils" "^1.7.4" ethers "5.7.2" -"@scure/base@^1.1.3", "@scure/base@~1.1.0", "@scure/base@~1.1.2", "@scure/base@~1.1.4": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" - integrity sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g== +"@scure/base@^1.1.3", "@scure/base@~1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" + integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== -"@scure/base@~1.1.7": +"@scure/base@~1.1.0", "@scure/base@~1.1.2", "@scure/base@~1.1.6": version "1.1.9" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== -"@scure/base@~1.1.8": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.8.tgz#8f23646c352f020c83bca750a82789e246d42b50" - integrity sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg== - -"@scure/base@~1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" - integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== - "@scure/bip32@1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.2.tgz#90e78c027d5e30f0b22c1f8d50ff12f3fb7559f8" @@ -3733,25 +3270,16 @@ "@noble/hashes" "~1.3.2" "@scure/base" "~1.1.2" -"@scure/bip32@1.3.3": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.3.tgz#a9624991dc8767087c57999a5d79488f48eae6c8" - integrity sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ== - dependencies: - "@noble/curves" "~1.3.0" - "@noble/hashes" "~1.3.2" - "@scure/base" "~1.1.4" - -"@scure/bip32@1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.5.0.tgz#dd4a2e1b8a9da60e012e776d954c4186db6328e6" - integrity sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw== +"@scure/bip32@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.4.0.tgz#4e1f1e196abedcef395b33b9674a042524e20d67" + integrity sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg== dependencies: - "@noble/curves" "~1.6.0" - "@noble/hashes" "~1.5.0" - "@scure/base" "~1.1.7" + "@noble/curves" "~1.4.0" + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" -"@scure/bip32@^1.5.0": +"@scure/bip32@1.6.0", "@scure/bip32@^1.5.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.0.tgz#6dbc6b4af7c9101b351f41231a879d8da47e0891" integrity sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA== @@ -3768,23 +3296,15 @@ "@noble/hashes" "~1.3.0" "@scure/base" "~1.1.0" -"@scure/bip39@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.2.tgz#f3426813f4ced11a47489cbcf7294aa963966527" - integrity sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA== - dependencies: - "@noble/hashes" "~1.3.2" - "@scure/base" "~1.1.4" - -"@scure/bip39@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.4.0.tgz#664d4f851564e2e1d4bffa0339f9546ea55960a6" - integrity sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw== +"@scure/bip39@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.3.0.tgz#0f258c16823ddd00739461ac31398b4e7d6a18c3" + integrity sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ== dependencies: - "@noble/hashes" "~1.5.0" - "@scure/base" "~1.1.8" + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" -"@scure/bip39@^1.4.0": +"@scure/bip39@1.5.0", "@scure/bip39@^1.4.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.0.tgz#c8f9533dbd787641b047984356531d84485f19be" integrity sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A== @@ -3807,163 +3327,77 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz#abb11d99aeb6d27f1b563c38147a72d50058e339" integrity sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ== -"@smithy/abort-controller@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-3.1.1.tgz#291210611ff6afecfc198d0ca72d5771d8461d16" - integrity sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ== - dependencies: - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/abort-controller@^3.1.6": - version "3.1.6" - resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-3.1.6.tgz#d9de97b85ca277df6ffb9ee7cd83d5da793ee6de" - integrity sha512-0XuhuHQlEqbNQZp7QxxrFTdVWdwxch4vjxYgfInF91hZFkPxf9QDrdQka0KfxFMPqLNzSw0b95uGTrLliQUavQ== - dependencies: - "@smithy/types" "^3.6.0" - tslib "^2.6.2" - -"@smithy/config-resolver@^3.0.10", "@smithy/config-resolver@^3.0.9": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-3.0.10.tgz#d9529d9893e5fae1f14cb1ffd55517feb6d7e50f" - integrity sha512-Uh0Sz9gdUuz538nvkPiyv1DZRX9+D15EKDtnQP5rYVAzM/dnYk3P8cg73jcxyOitPgT3mE3OVj7ky7sibzHWkw== +"@smithy/abort-controller@^3.1.9": + version "3.1.9" + resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-3.1.9.tgz#47d323f754136a489e972d7fd465d534d72fcbff" + integrity sha512-yiW0WI30zj8ZKoSYNx90no7ugVn3khlyH/z5W8qtKBtVE6awRALbhSG+2SAHA1r6bO/6M9utxYKVZ3PCJ1rWxw== dependencies: - "@smithy/node-config-provider" "^3.1.9" - "@smithy/types" "^3.6.0" - "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.8" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/config-resolver@^3.0.5": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-3.0.5.tgz#727978bba7ace754c741c259486a19d3083431fd" - integrity sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA== +"@smithy/config-resolver@^3.0.13": + version "3.0.13" + resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-3.0.13.tgz#653643a77a33d0f5907a5e7582353886b07ba752" + integrity sha512-Gr/qwzyPaTL1tZcq8WQyHhTZREER5R1Wytmz4WnVGL4onA3dNk6Btll55c8Vr58pLdvWZmtG8oZxJTw3t3q7Jg== dependencies: - "@smithy/node-config-provider" "^3.1.4" - "@smithy/types" "^3.3.0" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/types" "^3.7.2" "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.3" + "@smithy/util-middleware" "^3.0.11" tslib "^2.6.2" -"@smithy/core@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@smithy/core/-/core-2.4.0.tgz#56e917b6ab2dffeba681a05395c40a757d681147" - integrity sha512-cHXq+FneIF/KJbt4q4pjN186+Jf4ZB0ZOqEaZMBhT79srEyGDDBV31NqBRBjazz8ppQ1bJbDJMY9ba5wKFV36w== - dependencies: - "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" - "@smithy/middleware-serde" "^3.0.3" - "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-middleware" "^3.0.3" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/core@^2.4.8", "@smithy/core@^2.5.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@smithy/core/-/core-2.5.1.tgz#7f635b76778afca845bcb401d36f22fa37712f15" - integrity sha512-DujtuDA7BGEKExJ05W5OdxCoyekcKT3Rhg1ZGeiUWaz2BJIWXjZmsG/DIP4W48GHno7AQwRsaCb8NcBgH3QZpg== +"@smithy/core@^2.5.5": + version "2.5.5" + resolved "https://registry.yarnpkg.com/@smithy/core/-/core-2.5.5.tgz#c75b15caee9e58c800db3e6b99e9e373532d394a" + integrity sha512-G8G/sDDhXA7o0bOvkc7bgai6POuSld/+XhNnWAbpQTpLv2OZPvyqQ58tLPPlz0bSNsXktldDDREIv1LczFeNEw== dependencies: - "@smithy/middleware-serde" "^3.0.8" - "@smithy/protocol-http" "^4.1.5" - "@smithy/types" "^3.6.0" + "@smithy/middleware-serde" "^3.0.11" + "@smithy/protocol-http" "^4.1.8" + "@smithy/types" "^3.7.2" "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-middleware" "^3.0.8" - "@smithy/util-stream" "^3.2.1" + "@smithy/util-middleware" "^3.0.11" + "@smithy/util-stream" "^3.3.2" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/credential-provider-imds@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.0.tgz#0e0e7ddaff1a8633cb927aee1056c0ab506b7ecf" - integrity sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA== - dependencies: - "@smithy/node-config-provider" "^3.1.4" - "@smithy/property-provider" "^3.1.3" - "@smithy/types" "^3.3.0" - "@smithy/url-parser" "^3.0.3" - tslib "^2.6.2" - -"@smithy/credential-provider-imds@^3.2.4", "@smithy/credential-provider-imds@^3.2.5": - version "3.2.5" - resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.5.tgz#dbfd849a4a7ebd68519cd9fc35f78d091e126d0a" - integrity sha512-4FTQGAsuwqTzVMmiRVTn0RR9GrbRfkP0wfu/tXWVHd2LgNpTY0uglQpIScXK4NaEyXbB3JmZt8gfVqO50lP8wg== - dependencies: - "@smithy/node-config-provider" "^3.1.9" - "@smithy/property-provider" "^3.1.8" - "@smithy/types" "^3.6.0" - "@smithy/url-parser" "^3.0.8" - tslib "^2.6.2" - -"@smithy/fetch-http-handler@^3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz#c754de7e0ff2541b73ac9ba7cc955940114b3d62" - integrity sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg== - dependencies: - "@smithy/protocol-http" "^4.1.0" - "@smithy/querystring-builder" "^3.0.3" - "@smithy/types" "^3.3.0" - "@smithy/util-base64" "^3.0.0" - tslib "^2.6.2" - -"@smithy/fetch-http-handler@^3.2.9": - version "3.2.9" - resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.9.tgz#8d5199c162a37caa37a8b6848eefa9ca58221a0b" - integrity sha512-hYNVQOqhFQ6vOpenifFME546f0GfJn2OiQ3M0FDmuUu8V/Uiwy2wej7ZXxFBNqdx0R5DZAqWM1l6VRhGz8oE6A== +"@smithy/credential-provider-imds@^3.2.8": + version "3.2.8" + resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.8.tgz#27ed2747074c86a7d627a98e56f324a65cba88de" + integrity sha512-ZCY2yD0BY+K9iMXkkbnjo+08T2h8/34oHd0Jmh6BZUSZwaaGlGCyBT/3wnS7u7Xl33/EEfN4B6nQr3Gx5bYxgw== dependencies: - "@smithy/protocol-http" "^4.1.4" - "@smithy/querystring-builder" "^3.0.7" - "@smithy/types" "^3.5.0" - "@smithy/util-base64" "^3.0.0" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/property-provider" "^3.1.11" + "@smithy/types" "^3.7.2" + "@smithy/url-parser" "^3.0.11" tslib "^2.6.2" -"@smithy/fetch-http-handler@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-4.0.0.tgz#3763cb5178745ed630ed5bc3beb6328abdc31f36" - integrity sha512-MLb1f5tbBO2X6K4lMEKJvxeLooyg7guq48C2zKr4qM7F2Gpkz4dc+hdSgu77pCJ76jVqFBjZczHYAs6dp15N+g== +"@smithy/fetch-http-handler@^4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-4.1.2.tgz#f034ff16416b37d92908a1381ef5fddbf4ef1879" + integrity sha512-R7rU7Ae3ItU4rC0c5mB2sP5mJNbCfoDc8I5XlYjIZnquyUwec7fEo78F6DA3SmgJgkU1qTMcZJuGblxZsl10ZA== dependencies: - "@smithy/protocol-http" "^4.1.5" - "@smithy/querystring-builder" "^3.0.8" - "@smithy/types" "^3.6.0" + "@smithy/protocol-http" "^4.1.8" + "@smithy/querystring-builder" "^3.0.11" + "@smithy/types" "^3.7.2" "@smithy/util-base64" "^3.0.0" tslib "^2.6.2" -"@smithy/hash-node@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-3.0.3.tgz#82c5cb7b0f1a29ee7319081853d2d158c07dff24" - integrity sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw== - dependencies: - "@smithy/types" "^3.3.0" - "@smithy/util-buffer-from" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/hash-node@^3.0.7": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-3.0.8.tgz#f451cc342f74830466b0b39bf985dc3022634065" - integrity sha512-tlNQYbfpWXHimHqrvgo14DrMAgUBua/cNoz9fMYcDmYej7MAmUcjav/QKQbFc3NrcPxeJ7QClER4tWZmfwoPng== +"@smithy/hash-node@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-3.0.11.tgz#99e09ead3fc99c8cd7ca0f254ea0e35714f2a0d3" + integrity sha512-emP23rwYyZhQBvklqTtwetkQlqbNYirDiEEwXl2v0GYWMnCzxst7ZaRAnWuy28njp5kAH54lvkdG37MblZzaHA== dependencies: - "@smithy/types" "^3.6.0" + "@smithy/types" "^3.7.2" "@smithy/util-buffer-from" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/invalid-dependency@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz#8d9fd70e3a94b565a4eba4ffbdc95238e1930528" - integrity sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw== - dependencies: - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/invalid-dependency@^3.0.7": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-3.0.8.tgz#4d381a4c24832371ade79e904a72c173c9851e5f" - integrity sha512-7Qynk6NWtTQhnGTTZwks++nJhQ1O54Mzi7fz4PqZOiYXb4Z1Flpb2yRvdALoggTS8xjtohWUM+RygOtB30YL3Q== +"@smithy/invalid-dependency@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-3.0.11.tgz#8144d7b0af9d34ab5f672e1f674f97f8740bb9ae" + integrity sha512-NuQmVPEJjUX6c+UELyVz8kUx8Q539EDeNwbRyu4IIF8MeV7hUtq1FB3SHVyki2u++5XLMFqngeMKk7ccspnNyQ== dependencies: - "@smithy/types" "^3.6.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" "@smithy/is-array-buffer@^2.2.0": @@ -3980,341 +3414,170 @@ dependencies: tslib "^2.6.2" -"@smithy/middleware-content-length@^3.0.5": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-3.0.5.tgz#1680aa4fb2a1c0505756103c9a5c2916307d9035" - integrity sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw== - dependencies: - "@smithy/protocol-http" "^4.1.0" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/middleware-content-length@^3.0.9": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-3.0.10.tgz#738266f6d81436d7e3a86bea931bc64e04ae7dbf" - integrity sha512-T4dIdCs1d/+/qMpwhJ1DzOhxCZjZHbHazEPJWdB4GDi2HjIZllVzeBEcdJUN0fomV8DURsgOyrbEUzg3vzTaOg== +"@smithy/middleware-content-length@^3.0.13": + version "3.0.13" + resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-3.0.13.tgz#6e08fe52739ac8fb3996088e0f8837e4b2ea187f" + integrity sha512-zfMhzojhFpIX3P5ug7jxTjfUcIPcGjcQYzB9t+rv0g1TX7B0QdwONW+ATouaLoD7h7LOw/ZlXfkq4xJ/g2TrIw== dependencies: - "@smithy/protocol-http" "^4.1.5" - "@smithy/types" "^3.6.0" - tslib "^2.6.2" - -"@smithy/middleware-endpoint@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz#9b8a496d87a68ec43f3f1a0139868d6765a88119" - integrity sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw== - dependencies: - "@smithy/middleware-serde" "^3.0.3" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/shared-ini-file-loader" "^3.1.4" - "@smithy/types" "^3.3.0" - "@smithy/url-parser" "^3.0.3" - "@smithy/util-middleware" "^3.0.3" + "@smithy/protocol-http" "^4.1.8" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/middleware-endpoint@^3.1.4", "@smithy/middleware-endpoint@^3.2.1": - version "3.2.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-3.2.1.tgz#b9ee42d29d8f3a266883d293c4d6a586f7b60979" - integrity sha512-wWO3xYmFm6WRW8VsEJ5oU6h7aosFXfszlz3Dj176pTij6o21oZnzkCLzShfmRaaCHDkBXWBdO0c4sQAvLFP6zA== - dependencies: - "@smithy/core" "^2.5.1" - "@smithy/middleware-serde" "^3.0.8" - "@smithy/node-config-provider" "^3.1.9" - "@smithy/shared-ini-file-loader" "^3.1.9" - "@smithy/types" "^3.6.0" - "@smithy/url-parser" "^3.0.8" - "@smithy/util-middleware" "^3.0.8" - tslib "^2.6.2" - -"@smithy/middleware-retry@^3.0.15": - version "3.0.15" - resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-3.0.15.tgz#9b96900cde70d8aafd267e13f4e79241be90e0c7" - integrity sha512-iTMedvNt1ApdvkaoE8aSDuwaoc+BhvHqttbA/FO4Ty+y/S5hW6Ci/CTScG7vam4RYJWZxdTElc3MEfHRVH6cgQ== - dependencies: - "@smithy/node-config-provider" "^3.1.4" - "@smithy/protocol-http" "^4.1.0" - "@smithy/service-error-classification" "^3.0.3" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - "@smithy/util-middleware" "^3.0.3" - "@smithy/util-retry" "^3.0.3" +"@smithy/middleware-endpoint@^3.2.5": + version "3.2.5" + resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-3.2.5.tgz#bdcfdf1f342cf933b0b8a709996f9a8fbb8148f4" + integrity sha512-VhJNs/s/lyx4weiZdXSloBgoLoS8osV0dKIain8nGmx7of3QFKu5BSdEuk1z/U8x9iwes1i+XCiNusEvuK1ijg== + dependencies: + "@smithy/core" "^2.5.5" + "@smithy/middleware-serde" "^3.0.11" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/shared-ini-file-loader" "^3.1.12" + "@smithy/types" "^3.7.2" + "@smithy/url-parser" "^3.0.11" + "@smithy/util-middleware" "^3.0.11" tslib "^2.6.2" - uuid "^9.0.1" -"@smithy/middleware-retry@^3.0.23": - version "3.0.25" - resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-3.0.25.tgz#a6b1081fc1a0991ffe1d15e567e76198af01f37c" - integrity sha512-m1F70cPaMBML4HiTgCw5I+jFNtjgz5z5UdGnUbG37vw6kh4UvizFYjqJGHvicfgKMkDL6mXwyPp5mhZg02g5sg== - dependencies: - "@smithy/node-config-provider" "^3.1.9" - "@smithy/protocol-http" "^4.1.5" - "@smithy/service-error-classification" "^3.0.8" - "@smithy/smithy-client" "^3.4.2" - "@smithy/types" "^3.6.0" - "@smithy/util-middleware" "^3.0.8" - "@smithy/util-retry" "^3.0.8" +"@smithy/middleware-retry@^3.0.30": + version "3.0.30" + resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-3.0.30.tgz#2580322d0d28ad782b5b8c07c150b14efdc3b2f9" + integrity sha512-6323RL2BvAR3VQpTjHpa52kH/iSHyxd/G9ohb2MkBk2Ucu+oMtRXT8yi7KTSIS9nb58aupG6nO0OlXnQOAcvmQ== + dependencies: + "@smithy/node-config-provider" "^3.1.12" + "@smithy/protocol-http" "^4.1.8" + "@smithy/service-error-classification" "^3.0.11" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" + "@smithy/util-middleware" "^3.0.11" + "@smithy/util-retry" "^3.0.11" tslib "^2.6.2" uuid "^9.0.1" -"@smithy/middleware-serde@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz#74d974460f74d99f38c861e6862984543a880a66" - integrity sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA== - dependencies: - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/middleware-serde@^3.0.7", "@smithy/middleware-serde@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-3.0.8.tgz#a46d10dba3c395be0d28610d55c89ff8c07c0cd3" - integrity sha512-Xg2jK9Wc/1g/MBMP/EUn2DLspN8LNt+GMe7cgF+Ty3vl+Zvu+VeZU5nmhveU+H8pxyTsjrAkci8NqY6OuvZnjA== - dependencies: - "@smithy/types" "^3.6.0" - tslib "^2.6.2" - -"@smithy/middleware-stack@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz#91845c7e61e6f137fa912b623b6def719a4f6ce7" - integrity sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA== - dependencies: - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/middleware-stack@^3.0.7", "@smithy/middleware-stack@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-3.0.8.tgz#f1c7d9c7fe8280c6081141c88f4a76875da1fc43" - integrity sha512-d7ZuwvYgp1+3682Nx0MD3D/HtkmZd49N3JUndYWQXfRZrYEnCWYc8BHcNmVsPAp9gKvlurdg/mubE6b/rPS9MA== - dependencies: - "@smithy/types" "^3.6.0" - tslib "^2.6.2" - -"@smithy/node-config-provider@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-3.1.4.tgz#05647bed666aa8036a1ad72323c1942e5d421be1" - integrity sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ== - dependencies: - "@smithy/property-provider" "^3.1.3" - "@smithy/shared-ini-file-loader" "^3.1.4" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/node-config-provider@^3.1.8", "@smithy/node-config-provider@^3.1.9": - version "3.1.9" - resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-3.1.9.tgz#d27ba8e4753f1941c24ed0af824dbc6c492f510a" - integrity sha512-qRHoah49QJ71eemjuS/WhUXB+mpNtwHRWQr77J/m40ewBVVwvo52kYAmb7iuaECgGTTcYxHS4Wmewfwy++ueew== - dependencies: - "@smithy/property-provider" "^3.1.8" - "@smithy/shared-ini-file-loader" "^3.1.9" - "@smithy/types" "^3.6.0" - tslib "^2.6.2" - -"@smithy/node-http-handler@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz#be4195e45639e690d522cd5f11513ea822ff9d5f" - integrity sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg== - dependencies: - "@smithy/abort-controller" "^3.1.1" - "@smithy/protocol-http" "^4.1.0" - "@smithy/querystring-builder" "^3.0.3" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/node-http-handler@^3.2.4", "@smithy/node-http-handler@^3.2.5": - version "3.2.5" - resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-3.2.5.tgz#ad9d9ba1528bf0d4a655135e978ecc14b3df26a2" - integrity sha512-PkOwPNeKdvX/jCpn0A8n9/TyoxjGZB8WVoJmm9YzsnAgggTj4CrjpRHlTQw7dlLZ320n1mY1y+nTRUDViKi/3w== +"@smithy/middleware-serde@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-3.0.11.tgz#c7d54e0add4f83e05c6878a011fc664e21022f12" + integrity sha512-KzPAeySp/fOoQA82TpnwItvX8BBURecpx6ZMu75EZDkAcnPtO6vf7q4aH5QHs/F1s3/snQaSFbbUMcFFZ086Mw== dependencies: - "@smithy/abort-controller" "^3.1.6" - "@smithy/protocol-http" "^4.1.5" - "@smithy/querystring-builder" "^3.0.8" - "@smithy/types" "^3.6.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/property-provider@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-3.1.3.tgz#afd57ea82a3f6c79fbda95e3cb85c0ee0a79f39a" - integrity sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g== +"@smithy/middleware-stack@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-3.0.11.tgz#453af2096924e4064d9da4e053cfdf65d9a36acc" + integrity sha512-1HGo9a6/ikgOMrTrWL/WiN9N8GSVYpuRQO5kjstAq4CvV59bjqnh7TbdXGQ4vxLD3xlSjfBjq5t1SOELePsLnA== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/property-provider@^3.1.7", "@smithy/property-provider@^3.1.8": - version "3.1.8" - resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-3.1.8.tgz#b1c5a3949effbb9772785ad7ddc5b4b235b10fbe" - integrity sha512-ukNUyo6rHmusG64lmkjFeXemwYuKge1BJ8CtpVKmrxQxc6rhUX0vebcptFA9MmrGsnLhwnnqeH83VTU9hwOpjA== +"@smithy/node-config-provider@^3.1.12": + version "3.1.12" + resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-3.1.12.tgz#1b1d674fc83f943dc7b3017e37f16f374e878a6c" + integrity sha512-O9LVEu5J/u/FuNlZs+L7Ikn3lz7VB9hb0GtPT9MQeiBmtK8RSY3ULmsZgXhe6VAlgTw0YO+paQx4p8xdbs43vQ== dependencies: - "@smithy/types" "^3.6.0" + "@smithy/property-provider" "^3.1.11" + "@smithy/shared-ini-file-loader" "^3.1.12" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/protocol-http@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-4.1.0.tgz#23519d8f45bf4f33960ea5415847bc2b620a010b" - integrity sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA== +"@smithy/node-http-handler@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-3.3.2.tgz#b34685863b74dabdaf7860aa81b42d0d5437c7e0" + integrity sha512-t4ng1DAd527vlxvOfKFYEe6/QFBcsj7WpNlWTyjorwXXcKw3XlltBGbyHfSJ24QT84nF+agDha9tNYpzmSRZPA== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/abort-controller" "^3.1.9" + "@smithy/protocol-http" "^4.1.8" + "@smithy/querystring-builder" "^3.0.11" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/protocol-http@^4.1.4", "@smithy/protocol-http@^4.1.5": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-4.1.5.tgz#a1f397440f299b6a5abeed6866957fecb1bf5013" - integrity sha512-hsjtwpIemmCkm3ZV5fd/T0bPIugW1gJXwZ/hpuVubt2hEUApIoUTrf6qIdh9MAWlw0vjMrA1ztJLAwtNaZogvg== +"@smithy/property-provider@^3.1.11": + version "3.1.11" + resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-3.1.11.tgz#161cf1c2a2ada361e417382c57f5ba6fbca8acad" + integrity sha512-I/+TMc4XTQ3QAjXfOcUWbSS073oOEAxgx4aZy8jHaf8JQnRkq2SZWw8+PfDtBvLUjcGMdxl+YwtzWe6i5uhL/A== dependencies: - "@smithy/types" "^3.6.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/querystring-builder@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz#6b0e566f885bb84938d077c69e8f8555f686af13" - integrity sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw== +"@smithy/protocol-http@^4.1.8": + version "4.1.8" + resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-4.1.8.tgz#0461758671335f65e8ff3fc0885ab7ed253819c9" + integrity sha512-hmgIAVyxw1LySOwkgMIUN0kjN8TG9Nc85LJeEmEE/cNEe2rkHDUWhnJf2gxcSRFLWsyqWsrZGw40ROjUogg+Iw== dependencies: - "@smithy/types" "^3.3.0" - "@smithy/util-uri-escape" "^3.0.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/querystring-builder@^3.0.7", "@smithy/querystring-builder@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-3.0.8.tgz#0d845be53aa624771c518d1412881236ce12ed4f" - integrity sha512-btYxGVqFUARbUrN6VhL9c3dnSviIwBYD9Rz1jHuN1hgh28Fpv2xjU1HeCeDJX68xctz7r4l1PBnFhGg1WBBPuA== +"@smithy/querystring-builder@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-3.0.11.tgz#2ed04adbe725671824c5613d0d6f9376d791a909" + integrity sha512-u+5HV/9uJaeLj5XTb6+IEF/dokWWkEqJ0XiaRRogyREmKGUgZnNecLucADLdauWFKUNbQfulHFEZEdjwEBjXRg== dependencies: - "@smithy/types" "^3.6.0" + "@smithy/types" "^3.7.2" "@smithy/util-uri-escape" "^3.0.0" tslib "^2.6.2" -"@smithy/querystring-parser@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz#272a6b83f88dfcbbec8283d72a6bde850cc00091" - integrity sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ== - dependencies: - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/querystring-parser@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-3.0.8.tgz#057a8e2d301eea8eac7071923100ba38a824d7df" - integrity sha512-BtEk3FG7Ks64GAbt+JnKqwuobJNX8VmFLBsKIwWr1D60T426fGrV2L3YS5siOcUhhp6/Y6yhBw1PSPxA5p7qGg== - dependencies: - "@smithy/types" "^3.6.0" - tslib "^2.6.2" - -"@smithy/service-error-classification@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz#73484255060a094aa9372f6cd972dcaf97e3ce80" - integrity sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ== - dependencies: - "@smithy/types" "^3.3.0" - -"@smithy/service-error-classification@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-3.0.8.tgz#265ad2573b972f6c7bdd1ad6c5155a88aeeea1c4" - integrity sha512-uEC/kCCFto83bz5ZzapcrgGqHOh/0r69sZ2ZuHlgoD5kYgXJEThCoTuw/y1Ub3cE7aaKdznb+jD9xRPIfIwD7g== - dependencies: - "@smithy/types" "^3.6.0" - -"@smithy/shared-ini-file-loader@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.4.tgz#7dceaf5a5307a2ee347ace8aba17312a1a3ede15" - integrity sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ== +"@smithy/querystring-parser@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-3.0.11.tgz#9d3177ea19ce8462f18d9712b395239e1ca1f969" + integrity sha512-Je3kFvCsFMnso1ilPwA7GtlbPaTixa3WwC+K21kmMZHsBEOZYQaqxcMqeFFoU7/slFjKDIpiiPydvdJm8Q/MCw== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/shared-ini-file-loader@^3.1.8", "@smithy/shared-ini-file-loader@^3.1.9": - version "3.1.9" - resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.9.tgz#1b77852b5bb176445e1d80333fa3f739313a4928" - integrity sha512-/+OsJRNtoRbtsX0UpSgWVxFZLsJHo/4sTr+kBg/J78sr7iC+tHeOvOJrS5hCpVQ6sWBbhWLp1UNiuMyZhE6pmA== +"@smithy/service-error-classification@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-3.0.11.tgz#d3d7fc0aacd2e60d022507367e55c7939e5bcb8a" + integrity sha512-QnYDPkyewrJzCyaeI2Rmp7pDwbUETe+hU8ADkXmgNusO1bgHBH7ovXJiYmba8t0fNfJx75fE8dlM6SEmZxheog== dependencies: - "@smithy/types" "^3.6.0" - tslib "^2.6.2" + "@smithy/types" "^3.7.2" -"@smithy/signature-v4@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-4.1.0.tgz#251ff43dc1f4ad66776122732fea9e56efc56443" - integrity sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag== +"@smithy/shared-ini-file-loader@^3.1.12": + version "3.1.12" + resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.12.tgz#d98b1b663eb18935ce2cbc79024631d34f54042a" + integrity sha512-1xKSGI+U9KKdbG2qDvIR9dGrw3CNx+baqJfyr0igKEpjbHL5stsqAesYBzHChYHlelWtb87VnLWlhvfCz13H8Q== dependencies: - "@smithy/is-array-buffer" "^3.0.0" - "@smithy/protocol-http" "^4.1.0" - "@smithy/types" "^3.3.0" - "@smithy/util-hex-encoding" "^3.0.0" - "@smithy/util-middleware" "^3.0.3" - "@smithy/util-uri-escape" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/signature-v4@^4.2.0": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-4.2.1.tgz#a918fd7d99af9f60aa07617506fa54be408126ee" - integrity sha512-NsV1jF4EvmO5wqmaSzlnTVetemBS3FZHdyc5CExbDljcyJCEEkJr8ANu2JvtNbVg/9MvKAWV44kTrGS+Pi4INg== +"@smithy/signature-v4@^4.2.4": + version "4.2.4" + resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-4.2.4.tgz#3501d3d09fd82768867bfc00a7be4bad62f62f4d" + integrity sha512-5JWeMQYg81TgU4cG+OexAWdvDTs5JDdbEZx+Qr1iPbvo91QFGzjy0IkXAKaXUHqmKUJgSHK0ZxnCkgZpzkeNTA== dependencies: "@smithy/is-array-buffer" "^3.0.0" - "@smithy/protocol-http" "^4.1.5" - "@smithy/types" "^3.6.0" + "@smithy/protocol-http" "^4.1.8" + "@smithy/types" "^3.7.2" "@smithy/util-hex-encoding" "^3.0.0" - "@smithy/util-middleware" "^3.0.8" + "@smithy/util-middleware" "^3.0.11" "@smithy/util-uri-escape" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/smithy-client@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-3.2.0.tgz#6db94024e4bdaefa079ac68dbea23dafbea230c8" - integrity sha512-pDbtxs8WOhJLJSeaF/eAbPgXg4VVYFlRcL/zoNYA5WbG3wBL06CHtBSg53ppkttDpAJ/hdiede+xApip1CwSLw== - dependencies: - "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-stack" "^3.0.3" - "@smithy/protocol-http" "^4.1.0" - "@smithy/types" "^3.3.0" - "@smithy/util-stream" "^3.1.3" - tslib "^2.6.2" - -"@smithy/smithy-client@^3.4.0", "@smithy/smithy-client@^3.4.2": - version "3.4.2" - resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-3.4.2.tgz#a6e3ed98330ce170cf482e765bd0c21e0fde8ae4" - integrity sha512-dxw1BDxJiY9/zI3cBqfVrInij6ShjpV4fmGHesGZZUiP9OSE/EVfdwdRz0PgvkEvrZHpsj2htRaHJfftE8giBA== - dependencies: - "@smithy/core" "^2.5.1" - "@smithy/middleware-endpoint" "^3.2.1" - "@smithy/middleware-stack" "^3.0.8" - "@smithy/protocol-http" "^4.1.5" - "@smithy/types" "^3.6.0" - "@smithy/util-stream" "^3.2.1" - tslib "^2.6.2" - -"@smithy/types@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.0.0.tgz#00231052945159c64ffd8b91e8909d8d3006cb7e" - integrity sha512-VvWuQk2RKFuOr98gFhjca7fkBS+xLLURT8bUjk5XQoV0ZLm7WPwWPPY3/AwzTLuUBDeoKDCthfe1AsTUWaSEhw== - dependencies: - tslib "^2.6.2" - -"@smithy/types@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.3.0.tgz#fae037c733d09bc758946a01a3de0ef6e210b16b" - integrity sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA== - dependencies: - tslib "^2.6.2" - -"@smithy/types@^3.5.0", "@smithy/types@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.6.0.tgz#03a52bfd62ee4b7b2a1842c8ae3ada7a0a5ff3a4" - integrity sha512-8VXK/KzOHefoC65yRgCn5vG1cysPJjHnOVt9d0ybFQSmJgQj152vMn4EkYhGuaOmnnZvCPav/KnYyE6/KsNZ2w== - dependencies: +"@smithy/smithy-client@^3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-3.5.0.tgz#65cff262801b009998c1196764ee69929ee06f8a" + integrity sha512-Y8FeOa7gbDfCWf7njrkoRATPa5eNLUEjlJS5z5rXatYuGkCb80LbHcu8AQR8qgAZZaNHCLyo2N+pxPsV7l+ivg== + dependencies: + "@smithy/core" "^2.5.5" + "@smithy/middleware-endpoint" "^3.2.5" + "@smithy/middleware-stack" "^3.0.11" + "@smithy/protocol-http" "^4.1.8" + "@smithy/types" "^3.7.2" + "@smithy/util-stream" "^3.3.2" tslib "^2.6.2" -"@smithy/url-parser@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-3.0.3.tgz#e8a060d9810b24b1870385fc2b02485b8a6c5955" - integrity sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A== +"@smithy/types@^3.7.2": + version "3.7.2" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.7.2.tgz#05cb14840ada6f966de1bf9a9c7dd86027343e10" + integrity sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg== dependencies: - "@smithy/querystring-parser" "^3.0.3" - "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@smithy/url-parser@^3.0.7", "@smithy/url-parser@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-3.0.8.tgz#8057d91d55ba8df97d74576e000f927b42da9e18" - integrity sha512-4FdOhwpTW7jtSFWm7SpfLGKIBC9ZaTKG5nBF0wK24aoQKQyDIKUw3+KFWCQ9maMzrgTJIuOvOnsV2lLGW5XjTg== +"@smithy/url-parser@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-3.0.11.tgz#e5f5ffabfb6230159167cf4cc970705fca6b8b2d" + integrity sha512-TmlqXkSk8ZPhfc+SQutjmFr5FjC0av3GZP4B/10caK1SbRwe/v+Wzu/R6xEKxoNqL+8nY18s1byiy6HqPG37Aw== dependencies: - "@smithy/querystring-parser" "^3.0.8" - "@smithy/types" "^3.6.0" + "@smithy/querystring-parser" "^3.0.11" + "@smithy/types" "^3.7.2" tslib "^2.6.2" "@smithy/util-base64@^3.0.0": @@ -4363,70 +3626,37 @@ dependencies: tslib "^2.6.2" -"@smithy/util-defaults-mode-browser@^3.0.15": - version "3.0.15" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.15.tgz#df73b9ae3dddc9126e0bb93ebc720b09d7163858" - integrity sha512-FZ4Psa3vjp8kOXcd3HJOiDPBCWtiilLl57r0cnNtq/Ga9RSDrM5ERL6xt+tO43+2af6Pn5Yp92x2n5vPuduNfg== - dependencies: - "@smithy/property-provider" "^3.1.3" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - bowser "^2.11.0" - tslib "^2.6.2" - -"@smithy/util-defaults-mode-browser@^3.0.23": - version "3.0.25" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.25.tgz#ef9b84272d1db23503ff155f9075a4543ab6dab7" - integrity sha512-fRw7zymjIDt6XxIsLwfJfYUfbGoO9CmCJk6rjJ/X5cd20+d2Is7xjU5Kt/AiDt6hX8DAf5dztmfP5O82gR9emA== +"@smithy/util-defaults-mode-browser@^3.0.30": + version "3.0.30" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.30.tgz#6c0d95af3f15bef8f1fe3f6217cc4f5ba8df5554" + integrity sha512-nLuGmgfcr0gzm64pqF2UT4SGWVG8UGviAdayDlVzJPNa6Z4lqvpDzdRXmLxtOdEjVlTOEdpZ9dd3ZMMu488mzg== dependencies: - "@smithy/property-provider" "^3.1.8" - "@smithy/smithy-client" "^3.4.2" - "@smithy/types" "^3.6.0" + "@smithy/property-provider" "^3.1.11" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" bowser "^2.11.0" tslib "^2.6.2" -"@smithy/util-defaults-mode-node@^3.0.15": - version "3.0.15" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.15.tgz#d52476e1f2e66525d918b51f8d5a9b0972bf518e" - integrity sha512-KSyAAx2q6d0t6f/S4XB2+3+6aQacm3aLMhs9aLMqn18uYGUepbdssfogW5JQZpc6lXNBnp0tEnR5e9CEKmEd7A== - dependencies: - "@smithy/config-resolver" "^3.0.5" - "@smithy/credential-provider-imds" "^3.2.0" - "@smithy/node-config-provider" "^3.1.4" - "@smithy/property-provider" "^3.1.3" - "@smithy/smithy-client" "^3.2.0" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/util-defaults-mode-node@^3.0.23": - version "3.0.25" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.25.tgz#c16fe3995c8e90ae318e336178392173aebe1e37" - integrity sha512-H3BSZdBDiVZGzt8TG51Pd2FvFO0PAx/A0mJ0EH8a13KJ6iUCdYnw/Dk/MdC1kTd0eUuUGisDFaxXVXo4HHFL1g== - dependencies: - "@smithy/config-resolver" "^3.0.10" - "@smithy/credential-provider-imds" "^3.2.5" - "@smithy/node-config-provider" "^3.1.9" - "@smithy/property-provider" "^3.1.8" - "@smithy/smithy-client" "^3.4.2" - "@smithy/types" "^3.6.0" - tslib "^2.6.2" - -"@smithy/util-endpoints@^2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-2.0.5.tgz#e3a7a4d1c41250bfd2b2d890d591273a7d8934be" - integrity sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg== - dependencies: - "@smithy/node-config-provider" "^3.1.4" - "@smithy/types" "^3.3.0" +"@smithy/util-defaults-mode-node@^3.0.30": + version "3.0.30" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.30.tgz#33cdb02f90944b9ff221e2f8e0904a63ac1e335f" + integrity sha512-OD63eWoH68vp75mYcfYyuVH+p7Li/mY4sYOROnauDrtObo1cS4uWfsy/zhOTW8F8ZPxQC1ZXZKVxoxvMGUv2Ow== + dependencies: + "@smithy/config-resolver" "^3.0.13" + "@smithy/credential-provider-imds" "^3.2.8" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/property-provider" "^3.1.11" + "@smithy/smithy-client" "^3.5.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/util-endpoints@^2.1.3": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-2.1.4.tgz#a29134c2b1982442c5fc3be18d9b22796e8eb964" - integrity sha512-kPt8j4emm7rdMWQyL0F89o92q10gvCUa6sBkBtDJ7nV2+P7wpXczzOfoDJ49CKXe5CCqb8dc1W+ZdLlrKzSAnQ== +"@smithy/util-endpoints@^2.1.7": + version "2.1.7" + resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-2.1.7.tgz#a088ebfab946a7219dd4763bfced82709894b82d" + integrity sha512-tSfcqKcN/Oo2STEYCABVuKgJ76nyyr6skGl9t15hs+YaiU06sgMkN7QYjo0BbVw+KT26zok3IzbdSOksQ4YzVw== dependencies: - "@smithy/node-config-provider" "^3.1.9" - "@smithy/types" "^3.6.0" + "@smithy/node-config-provider" "^3.1.12" + "@smithy/types" "^3.7.2" tslib "^2.6.2" "@smithy/util-hex-encoding@^3.0.0": @@ -4436,62 +3666,31 @@ dependencies: tslib "^2.6.2" -"@smithy/util-middleware@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.3.tgz#07bf9602682f5a6c55bc2f0384303f85fc68c87e" - integrity sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw== - dependencies: - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/util-middleware@^3.0.7", "@smithy/util-middleware@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.8.tgz#372bc7a2845408ad69da039d277fc23c2734d0c6" - integrity sha512-p7iYAPaQjoeM+AKABpYWeDdtwQNxasr4aXQEA/OmbOaug9V0odRVDy3Wx4ci8soljE/JXQo+abV0qZpW8NX0yA== - dependencies: - "@smithy/types" "^3.6.0" - tslib "^2.6.2" - -"@smithy/util-retry@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-3.0.3.tgz#9b2ac0dbb1c81f69812a8affa4d772bebfc0e049" - integrity sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w== - dependencies: - "@smithy/service-error-classification" "^3.0.3" - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/util-retry@^3.0.7", "@smithy/util-retry@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-3.0.8.tgz#9c607c175a4d8a87b5d8ebaf308f6b849e4dc4d0" - integrity sha512-TCEhLnY581YJ+g1x0hapPz13JFqzmh/pMWL2KEFASC51qCfw3+Y47MrTmea4bUE5vsdxQ4F6/KFbUeSz22Q1ow== +"@smithy/util-middleware@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.11.tgz#2ab5c17266b42c225e62befcffb048afa682b5bf" + integrity sha512-dWpyc1e1R6VoXrwLoLDd57U1z6CwNSdkM69Ie4+6uYh2GC7Vg51Qtan7ITzczuVpqezdDTKJGJB95fFvvjU/ow== dependencies: - "@smithy/service-error-classification" "^3.0.8" - "@smithy/types" "^3.6.0" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/util-stream@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-3.1.3.tgz#699ee2397cc1d474e46d2034039d5263812dca64" - integrity sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw== +"@smithy/util-retry@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-3.0.11.tgz#d267e5ccb290165cee69732547fea17b695a7425" + integrity sha512-hJUC6W7A3DQgaee3Hp9ZFcOxVDZzmBIRBPlUAk8/fSOEl7pE/aX7Dci0JycNOnm9Mfr0KV2XjIlUOcGWXQUdVQ== dependencies: - "@smithy/fetch-http-handler" "^3.2.4" - "@smithy/node-http-handler" "^3.1.4" - "@smithy/types" "^3.3.0" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-buffer-from" "^3.0.0" - "@smithy/util-hex-encoding" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" + "@smithy/service-error-classification" "^3.0.11" + "@smithy/types" "^3.7.2" tslib "^2.6.2" -"@smithy/util-stream@^3.1.9", "@smithy/util-stream@^3.2.1": - version "3.2.1" - resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-3.2.1.tgz#f3055dc4c8caba8af4e47191ea7e773d0e5a429d" - integrity sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A== +"@smithy/util-stream@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-3.3.2.tgz#daeea26397e8541cf2499ce65bf0b8d528cba421" + integrity sha512-sInAqdiVeisUGYAv/FrXpmJ0b4WTFmciTRqzhb7wVuem9BHvhIG7tpiYHLDWrl2stOokNZpTTGqz3mzB2qFwXg== dependencies: - "@smithy/fetch-http-handler" "^4.0.0" - "@smithy/node-http-handler" "^3.2.5" - "@smithy/types" "^3.6.0" + "@smithy/fetch-http-handler" "^4.1.2" + "@smithy/node-http-handler" "^3.3.2" + "@smithy/types" "^3.7.2" "@smithy/util-base64" "^3.0.0" "@smithy/util-buffer-from" "^3.0.0" "@smithy/util-hex-encoding" "^3.0.0" @@ -4665,10 +3864,10 @@ resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.29.0.tgz#d0b3d12c07d5a47f42ab0c1ed4f317106f3d4b20" integrity sha512-WgPTRs58hm9CMzEr5jpISe8HXa3qKQ8CxewdYZeVnA54JrPY9B1CZiwsCoLpLkf0dGRZq+LcX5OiJb0bEsOFww== -"@tanstack/query-core@5.59.20": - version "5.59.20" - resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.59.20.tgz#356718976536727b9af0ad1163a21fd6a44ee0a9" - integrity sha512-e8vw0lf7KwfGe1if4uPFhvZRWULqHjFcz3K8AebtieXvnMOz5FSzlZe3mTLlPuUBcydCnBRqYs2YJ5ys68wwLg== +"@tanstack/query-core@5.62.7": + version "5.62.7" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.62.7.tgz#c7f6d0131c08cd2f60e73ec6e7b70e2e9e335def" + integrity sha512-fgpfmwatsrUal6V+8EC2cxZIQVl9xvL7qYa03gsdsCy985UTUlS4N+/3hCzwR0PclYDqisca2AqR1BVgJGpUDA== "@tanstack/react-query@5.29.2": version "5.29.2" @@ -4677,29 +3876,29 @@ dependencies: "@tanstack/query-core" "5.29.0" -"@tanstack/react-query@5.60.2": - version "5.60.2" - resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.60.2.tgz#a65db96702c11f3f868c40372ce66f05c2a77cc6" - integrity sha512-JhpJNxIAPuE0YCpP1Py4zAsgx+zY0V531McRMtQbwVlJF8+mlZwcOPrzGmPV248K8IP+mPbsfxXToVNMNwjUcw== +"@tanstack/react-query@5.62.7": + version "5.62.7" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.62.7.tgz#8f253439a38ad6ce820bc6d42d89ca2556574d1a" + integrity sha512-+xCtP4UAFDTlRTYyEjLx0sRtWyr5GIk7TZjZwBu4YaNahi3Rt2oMyRqfpfVrtwsqY2sayP4iXVCwmC+ZqqFmuw== dependencies: - "@tanstack/query-core" "5.59.20" + "@tanstack/query-core" "5.62.7" "@thirdweb-dev/auth@^4.1.87": - version "4.1.88" - resolved "https://registry.yarnpkg.com/@thirdweb-dev/auth/-/auth-4.1.88.tgz#55539f3fa8ef459764b028bcef319608c57a1d6e" - integrity sha512-Lf1BsJbyH2giIBkEGf+JIK7OVoX1ozgTJIcq+REH+AKmfgv7TTBgxctxcgga46+H+RQ0F7CZON5nvidAHZ46fA== + version "4.1.97" + resolved "https://registry.yarnpkg.com/@thirdweb-dev/auth/-/auth-4.1.97.tgz#520aa657adb09b69bba167648e89ae9d88f8de2d" + integrity sha512-uJgbJxkFleQKKQgifuW9fJNfpBWPzbqSYAOirj/t/+Cfg/yKgoRGjtng3J8F7axLIGMgVR58V39/JRrrXyKJbg== dependencies: "@fastify/cookie" "^9.3.1" - "@thirdweb-dev/wallets" "2.5.30" + "@thirdweb-dev/wallets" "2.5.39" cookie "^0.6.0" fastify-type-provider-zod "^1.1.9" uuid "^9.0.1" zod "^3.22.4" -"@thirdweb-dev/chains@0.1.115", "@thirdweb-dev/chains@^0.1.77": - version "0.1.115" - resolved "https://registry.yarnpkg.com/@thirdweb-dev/chains/-/chains-0.1.115.tgz#354fd17cf4ecca5d70daffb19ac05b47c7452806" - integrity sha512-Os+7RZTnFYWTylGLVzgTJv+IaWQCfIp94yCIOWt7OI/fZQT5C5gbQOKVPcKrQP+7QJ205vyxpzlqYuyZcHz08Q== +"@thirdweb-dev/chains@0.1.120", "@thirdweb-dev/chains@^0.1.77": + version "0.1.120" + resolved "https://registry.yarnpkg.com/@thirdweb-dev/chains/-/chains-0.1.120.tgz#bf5a1e16eb5ef9bf57c54c544f0c6cfa8844ef54" + integrity sha512-6wj8eIylLk8wSyTUeN70LD72yN+QIwyynDfKtVGJXTcrEN2K+vuqnRE20gvA2ayX7KMyDyy76JxPlyv6SZyLGw== "@thirdweb-dev/contracts-js@1.3.23": version "1.3.23" @@ -4746,13 +3945,13 @@ buffer-reverse "^1.0.1" treeify "^1.1.0" -"@thirdweb-dev/sdk@4.0.90", "@thirdweb-dev/sdk@^4.0.89": - version "4.0.90" - resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-4.0.90.tgz#1047a8a295c7915a42772ac2d35120d24a7c17b0" - integrity sha512-9tAQ7BcQkE65R7F8t6S9nqy3gwt+Lr57zZuLGBLRcFsvd/QmYGOFh6i8qLNnxleasGXvud7H9cA59BBoRDznng== +"@thirdweb-dev/sdk@4.0.99", "@thirdweb-dev/sdk@^4.0.89": + version "4.0.99" + resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-4.0.99.tgz#07c4e0a2f2ec80bdd79df1d6565e11d42336fa4f" + integrity sha512-Zm1K+tmzz5mnVBues68Bi6vRO6RIjeiblt8URGxoyXNtfLNOmDDZ4t8Znsjg/oegrvh5LyT1XnZfepBZdl0ZSw== dependencies: - "@eth-optimism/sdk" "3.3.0" - "@thirdweb-dev/chains" "0.1.115" + "@eth-optimism/sdk" "3.3.2" + "@thirdweb-dev/chains" "0.1.120" "@thirdweb-dev/contracts-js" "1.3.23" "@thirdweb-dev/crypto" "0.2.6" "@thirdweb-dev/generated-abis" "0.0.2" @@ -4764,7 +3963,7 @@ buffer "^6.0.3" eventemitter3 "^5.0.1" fast-deep-equal "^3.1.3" - thirdweb "5.26.0" + thirdweb "5.29.6" tiny-invariant "^1.3.3" tweetnacl "^1.0.3" uuid "^9.0.1" @@ -4772,12 +3971,12 @@ zod "^3.22.4" "@thirdweb-dev/service-utils@^0.4.28": - version "0.4.30" - resolved "https://registry.yarnpkg.com/@thirdweb-dev/service-utils/-/service-utils-0.4.30.tgz#628545af4df02fe97c2a3afcfb3413c5d97b55c9" - integrity sha512-LirSDJU42ftDHla2Wl9vnezWuuGSlMbb0Mwb/58Ncd+JNaNKT7MX1jCn9b4KUqKMQdfG5MM0wNTbSWQ+umZ6rg== + version "0.4.52" + resolved "https://registry.yarnpkg.com/@thirdweb-dev/service-utils/-/service-utils-0.4.52.tgz#6473ab0fabf7e9ee138776855c5bb4729f88efdb" + integrity sha512-24g+juzurNBRQ4llwQBbfQE/msQplFTbnDsp2ihxkb9KThTwI5+d/jWvEoXumFDWm3Ji+FDBJIbNaY9H2Fz6AQ== dependencies: - aws4fetch "1.0.18" - zod "3.22.4" + aws4fetch "1.0.20" + zod "3.23.8" "@thirdweb-dev/storage@2.0.15": version "2.0.15" @@ -4789,10 +3988,10 @@ form-data "^4.0.0" uuid "^9.0.1" -"@thirdweb-dev/wallets@2.5.30": - version "2.5.30" - resolved "https://registry.yarnpkg.com/@thirdweb-dev/wallets/-/wallets-2.5.30.tgz#69e435d9e4e97c793cf4d633e4b29586194bd075" - integrity sha512-HSRJu0ZhjAN8FKAitGi5y4Y5npjXfRWIuGbSwSbw+oCvgDoi7/4DD2xa8boHzGPPdElIQNiCdjhzDMFLEe0umg== +"@thirdweb-dev/wallets@2.5.39": + version "2.5.39" + resolved "https://registry.yarnpkg.com/@thirdweb-dev/wallets/-/wallets-2.5.39.tgz#8bc4db581a7651a320c738401bc6f284d7ec618b" + integrity sha512-VcPnpTHZZwdCap+o3mD8xngC2NV8s0DiQD0BdAuEEhQv+664gLsVRUxZKvW7h/lBXxkyEvSnSOgRwQ3zTVSPvw== dependencies: "@account-abstraction/contracts" "^0.5.0" "@blocto/sdk" "0.10.2" @@ -4807,17 +4006,17 @@ "@safe-global/safe-core-sdk" "^3.3.5" "@safe-global/safe-ethers-adapters" "0.1.0-alpha.19" "@safe-global/safe-ethers-lib" "^1.9.4" - "@thirdweb-dev/chains" "0.1.115" + "@thirdweb-dev/chains" "0.1.120" "@thirdweb-dev/contracts-js" "1.3.23" "@thirdweb-dev/crypto" "0.2.6" - "@thirdweb-dev/sdk" "4.0.90" - "@walletconnect/core" "^2.12.1" + "@thirdweb-dev/sdk" "4.0.99" + "@walletconnect/core" "^2.13.2" "@walletconnect/ethereum-provider" "2.12.2" "@walletconnect/jsonrpc-utils" "^1.0.8" "@walletconnect/modal" "^2.6.2" - "@walletconnect/types" "^2.12.1" - "@walletconnect/utils" "^2.13.0" - "@walletconnect/web3wallet" "^1.11.2" + "@walletconnect/types" "^2.13.2" + "@walletconnect/utils" "^2.13.2" + "@walletconnect/web3wallet" "^1.12.2" asn1.js "5.4.1" bn.js "5.2.1" buffer "^6.0.3" @@ -4839,9 +4038,9 @@ integrity sha512-uPgKMmM9fmn7I+Zi6YBqctOye4SlJsHKcisjHIMWpb2YKZRc36GpKyNuQ03JcT+oNXg1m7Uv4wU94EVltn8/cw== "@types/bn.js@*", "@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": - version "5.1.5" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" - integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== + version "5.1.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.6.tgz#9ba818eec0c85e4d3c679518428afdf611d03203" + integrity sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w== dependencies: "@types/node" "*" @@ -4858,9 +4057,9 @@ integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== "@types/cli-progress@^3.11.3": - version "3.11.5" - resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.5.tgz#9518c745e78557efda057e3f96a5990c717268c3" - integrity sha512-D4PbNRbviKyppS5ivBGyFO29POlySLmA2HyUFE4p5QGazAMM3CwkKWcvTl8gvElSuxRh6FPKL8XmidX873ou4g== + version "3.11.6" + resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.6.tgz#94b334ebe4190f710e51c1bf9b4fedb681fa9e45" + integrity sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA== dependencies: "@types/node" "*" @@ -4883,16 +4082,11 @@ dependencies: "@types/bn.js" "*" -"@types/estree@1.0.6": +"@types/estree@1.0.6", "@types/estree@^1.0.0": version "1.0.6" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== -"@types/estree@^1.0.0": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== - "@types/glob@*": version "8.1.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc" @@ -4907,9 +4101,9 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/jsonwebtoken@^9.0.6": - version "9.0.6" - resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.6.tgz#d1af3544d99ad992fb6681bbe60676e06b032bd3" - integrity sha512-/5hndP5dCjloafCXns6SZyESp3Ldq7YjH3zwzwczYnjxIT0Fqzk5ROSYVGfFyczIue7IUEj8hkvLbPoLQ18vQw== + version "9.0.7" + resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.7.tgz#e49b96c2b29356ed462e9708fc73b833014727d2" + integrity sha512-ugo316mmTYBl2g81zDFnZ7cfxlut3o+/EQdaP7J8QN2kY6lJ22hmQYCK5EHcJHbrW+dkCGSCPgbG8JtYj6qSrg== dependencies: "@types/node" "*" @@ -4924,9 +4118,9 @@ integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== "@types/markdown-it@^14.1.1": - version "14.1.1" - resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-14.1.1.tgz#06bafb7a4e3f77b62b1f308acf7df76687887e0b" - integrity sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg== + version "14.1.2" + resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-14.1.2.tgz#57f2532a0800067d9b934f3521429a2e8bfb4c61" + integrity sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog== dependencies: "@types/linkify-it" "^5" "@types/mdurl" "^2" @@ -4952,11 +4146,11 @@ integrity sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg== "@types/node@*", "@types/node@>=13.7.0": - version "20.12.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.14.tgz#0c5cf7ef26aedfd64b0539bba9380ed1f57dcc77" - integrity sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg== + version "22.10.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9" + integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== dependencies: - undici-types "~5.26.4" + undici-types "~6.20.0" "@types/node@^12.12.6": version "12.20.55" @@ -4964,9 +4158,9 @@ integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== "@types/node@^18.15.4": - version "18.19.33" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.33.tgz#98cd286a1b8a5e11aa06623210240bcc28e95c48" - integrity sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A== + version "18.19.68" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.68.tgz#f4f10d9927a7eaf3568c46a6d739cc0967ccb701" + integrity sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw== dependencies: undici-types "~5.26.4" @@ -4983,9 +4177,9 @@ "@types/node" "*" "@types/pg@^8.6.6": - version "8.11.6" - resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.11.6.tgz#a2d0fb0a14b53951a17df5197401569fb9c0c54b" - integrity sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ== + version "8.11.10" + resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.11.10.tgz#b8fb2b2b759d452fe3ec182beadd382563b63291" + integrity sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg== dependencies: "@types/node" "*" pg-protocol "*" @@ -5037,80 +4231,87 @@ integrity sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA== "@types/ws@^8.5.5": - version "8.5.10" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" - integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== + version "8.5.13" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.13.tgz#6414c280875e2691d0d1e080b05addbf5cb91e20" + integrity sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA== dependencies: "@types/node" "*" "@vitest/coverage-v8@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-2.0.3.tgz#a3c69ac301e4aebc0a28a3ad27a89cedce2f760e" - integrity sha512-53d+6jXFdYbasXBmsL6qaGIfcY5eBQq0sP57AjdasOcSiGNj4qxkkpDKIitUNfjxcfAfUfQ8BD0OR2fSey64+g== + version "2.1.8" + resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-2.1.8.tgz#738527e6e79cef5004248452527e272e0df12284" + integrity sha512-2Y7BPlKH18mAZYAW1tYByudlCYrQyl5RGvnnDYJKW5tCiO5qg3KSAy3XAxcxKz900a0ZXxWtKrMuZLe3lKBpJw== dependencies: "@ampproject/remapping" "^2.3.0" "@bcoe/v8-coverage" "^0.2.3" - debug "^4.3.5" + debug "^4.3.7" istanbul-lib-coverage "^3.2.2" istanbul-lib-report "^3.0.1" istanbul-lib-source-maps "^5.0.6" istanbul-reports "^3.1.7" - magic-string "^0.30.10" - magicast "^0.3.4" - std-env "^3.7.0" - strip-literal "^2.1.0" + magic-string "^0.30.12" + magicast "^0.3.5" + std-env "^3.8.0" test-exclude "^7.0.1" tinyrainbow "^1.2.0" -"@vitest/expect@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-2.0.3.tgz#367727256f2a253e21a3e69cd996af51fc7899b1" - integrity sha512-X6AepoOYePM0lDNUPsGXTxgXZAl3EXd0GYe/MZyVE4HzkUqyUVC6S3PrY5mClDJ6/7/7vALLMV3+xD/Ko60Hqg== +"@vitest/expect@2.1.8": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-2.1.8.tgz#13fad0e8d5a0bf0feb675dcf1d1f1a36a1773bc1" + integrity sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw== dependencies: - "@vitest/spy" "2.0.3" - "@vitest/utils" "2.0.3" - chai "^5.1.1" + "@vitest/spy" "2.1.8" + "@vitest/utils" "2.1.8" + chai "^5.1.2" tinyrainbow "^1.2.0" -"@vitest/pretty-format@2.0.3", "@vitest/pretty-format@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@vitest/pretty-format/-/pretty-format-2.0.3.tgz#30af705250cd055890091999e467968e41872c82" - integrity sha512-URM4GLsB2xD37nnTyvf6kfObFafxmycCL8un3OC9gaCs5cti2u+5rJdIflZ2fUJUen4NbvF6jCufwViAFLvz1g== +"@vitest/mocker@2.1.8": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@vitest/mocker/-/mocker-2.1.8.tgz#51dec42ac244e949d20009249e033e274e323f73" + integrity sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA== + dependencies: + "@vitest/spy" "2.1.8" + estree-walker "^3.0.3" + magic-string "^0.30.12" + +"@vitest/pretty-format@2.1.8", "@vitest/pretty-format@^2.1.8": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@vitest/pretty-format/-/pretty-format-2.1.8.tgz#88f47726e5d0cf4ba873d50c135b02e4395e2bca" + integrity sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ== dependencies: tinyrainbow "^1.2.0" -"@vitest/runner@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-2.0.3.tgz#4310ff4583d7874f57b5a8a194062bb85f07b0df" - integrity sha512-EmSP4mcjYhAcuBWwqgpjR3FYVeiA4ROzRunqKltWjBfLNs1tnMLtF+qtgd5ClTwkDP6/DGlKJTNa6WxNK0bNYQ== +"@vitest/runner@2.1.8": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-2.1.8.tgz#b0e2dd29ca49c25e9323ea2a45a5125d8729759f" + integrity sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg== dependencies: - "@vitest/utils" "2.0.3" + "@vitest/utils" "2.1.8" pathe "^1.1.2" -"@vitest/snapshot@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-2.0.3.tgz#31acf5906f8c12f9c7fde21b84cc28f043e983b1" - integrity sha512-6OyA6v65Oe3tTzoSuRPcU6kh9m+mPL1vQ2jDlPdn9IQoUxl8rXhBnfICNOC+vwxWY684Vt5UPgtcA2aPFBb6wg== +"@vitest/snapshot@2.1.8": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-2.1.8.tgz#d5dc204f4b95dc8b5e468b455dfc99000047d2de" + integrity sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg== dependencies: - "@vitest/pretty-format" "2.0.3" - magic-string "^0.30.10" + "@vitest/pretty-format" "2.1.8" + magic-string "^0.30.12" pathe "^1.1.2" -"@vitest/spy@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-2.0.3.tgz#62a14f6d7ec4f13caeeecac42d37f903f68c83c1" - integrity sha512-sfqyAw/ypOXlaj4S+w8689qKM1OyPOqnonqOc9T91DsoHbfN5mU7FdifWWv3MtQFf0lEUstEwR9L/q/M390C+A== +"@vitest/spy@2.1.8": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-2.1.8.tgz#bc41af3e1e6a41ae3b67e51f09724136b88fa447" + integrity sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg== dependencies: - tinyspy "^3.0.0" + tinyspy "^3.0.2" -"@vitest/utils@2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-2.0.3.tgz#3c57f5338e49c91e3c4ac5be8c74ae22a3c2d5b4" - integrity sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg== +"@vitest/utils@2.1.8": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-2.1.8.tgz#f8ef85525f3362ebd37fd25d268745108d6ae388" + integrity sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA== dependencies: - "@vitest/pretty-format" "2.0.3" - estree-walker "^3.0.3" - loupe "^3.1.1" + "@vitest/pretty-format" "2.1.8" + loupe "^3.1.2" tinyrainbow "^1.2.0" "@walletconnect/auth-client@2.1.2": @@ -5155,10 +4356,10 @@ lodash.isequal "4.5.0" uint8arrays "^3.1.0" -"@walletconnect/core@2.13.1", "@walletconnect/core@^2.10.1", "@walletconnect/core@^2.12.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.1.tgz#a59646e39a5beaa3f3551d129af43cd404cf4faf" - integrity sha512-h0MSYKJu9i1VEs5koCTT7c5YeQ1Kj0ncTFiMqANbDnB1r3mBulXn+FKtZ2fCmf1j7KDpgluuUzpSs+sQfPcv4Q== +"@walletconnect/core@2.17.1": + version "2.17.1" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.17.1.tgz#8ee51d630068e4450014fe62a76af895ab1d349d" + integrity sha512-SMgJR5hEyEE/tENIuvlEb4aB9tmMXPzQ38Y61VgYBmwAFEhOHtpt8EDfnfRWqEhMyXuBXG4K70Yh8c67Yry+Xw== dependencies: "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-provider" "1.0.14" @@ -5167,18 +4368,18 @@ "@walletconnect/jsonrpc-ws-connection" "1.0.14" "@walletconnect/keyvaluestorage" "1.1.1" "@walletconnect/logger" "2.1.2" - "@walletconnect/relay-api" "1.0.10" + "@walletconnect/relay-api" "1.0.11" "@walletconnect/relay-auth" "1.0.4" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" + "@walletconnect/types" "2.17.1" + "@walletconnect/utils" "2.17.1" + "@walletconnect/window-getters" "1.0.1" events "3.3.0" - isomorphic-unfetch "3.1.0" lodash.isequal "4.5.0" uint8arrays "3.1.0" -"@walletconnect/core@2.17.2": +"@walletconnect/core@2.17.2", "@walletconnect/core@^2.10.1", "@walletconnect/core@^2.13.2": version "2.17.2" resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.17.2.tgz#877dc03f190d7b262bff8ce346330fdf1019cd83" integrity sha512-O9VUsFg78CbvIaxfQuZMsHcJ4a2Z16DRz/O4S+uOAcGKhH/i/ln8hp864Tb+xRvifWSzaZ6CeAVxk657F+pscA== @@ -5347,13 +4548,6 @@ "@walletconnect/safe-json" "^1.0.2" pino "7.11.0" -"@walletconnect/modal-core@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.6.2.tgz#d73e45d96668764e0c8668ea07a45bb8b81119e9" - integrity sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA== - dependencies: - valtio "1.11.2" - "@walletconnect/modal-core@2.7.0": version "2.7.0" resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.7.0.tgz#73c13c3b7b0abf9ccdbac9b242254a86327ce0a4" @@ -5361,16 +4555,6 @@ dependencies: valtio "1.11.2" -"@walletconnect/modal-ui@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz#fa57c087c57b7f76aaae93deab0f84bb68b59cf9" - integrity sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA== - dependencies: - "@walletconnect/modal-core" "2.6.2" - lit "2.8.0" - motion "10.16.2" - qrcode "1.5.3" - "@walletconnect/modal-ui@2.7.0": version "2.7.0" resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.7.0.tgz#dbbb7ee46a5a25f7d39db622706f2d197b268cbb" @@ -5381,7 +4565,7 @@ motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal@2.7.0": +"@walletconnect/modal@2.7.0", "@walletconnect/modal@^2.6.2": version "2.7.0" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.7.0.tgz#55f969796d104cce1205f5f844d8f8438b79723a" integrity sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw== @@ -5389,21 +4573,6 @@ "@walletconnect/modal-core" "2.7.0" "@walletconnect/modal-ui" "2.7.0" -"@walletconnect/modal@^2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" - integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== - dependencies: - "@walletconnect/modal-core" "2.6.2" - "@walletconnect/modal-ui" "2.6.2" - -"@walletconnect/relay-api@1.0.10": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.10.tgz#5aef3cd07c21582b968136179aa75849dcc65499" - integrity sha512-tqrdd4zU9VBNqUaXXQASaexklv6A54yEyQQEXYOCr+Jz8Ket0dmPBDyg19LVSNUN2cipAghQc45/KVmfFJ0cYw== - dependencies: - "@walletconnect/jsonrpc-types" "^1.0.2" - "@walletconnect/relay-api@1.0.11", "@walletconnect/relay-api@^1.0.9": version "1.0.11" resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.11.tgz#80ab7ef2e83c6c173be1a59756f95e515fb63224" @@ -5445,22 +4614,22 @@ "@walletconnect/utils" "2.12.2" events "^3.3.0" -"@walletconnect/sign-client@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.1.tgz#7bdc9226218fd33caf3aef69dff0b4140abc7fa8" - integrity sha512-e+dcqcLsedB4ZjnePFM5Cy8oxu0dyz5iZfhfKH/MOrQV/hyhZ+hJwh4MmkO2QyEu2PERKs9o2Uc6x8RZdi0UAQ== +"@walletconnect/sign-client@2.17.1": + version "2.17.1" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.17.1.tgz#0777536427eba1b725c111ecc08eb301e05a8c55" + integrity sha512-6rLw6YNy0smslH9wrFTbNiYrGsL3DrOsS5FcuU4gIN6oh8pGYOFZ5FiSyTTroc5tngOk3/Sd7dlGY9S7O4nveg== dependencies: - "@walletconnect/core" "2.13.1" + "@walletconnect/core" "2.17.1" "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "2.1.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" + "@walletconnect/types" "2.17.1" + "@walletconnect/utils" "2.17.1" events "3.3.0" -"@walletconnect/sign-client@2.17.2": +"@walletconnect/sign-client@2.17.2", "@walletconnect/sign-client@^2.13.1": version "2.17.2" resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.17.2.tgz#b8bd125d7c34a67916745ebbdbbc834db5518c8b" integrity sha512-/wigdCIQjlBXSWY43Id0IPvZ5biq4HiiQZti8Ljvx408UYjmqcxcBitbj2UJXMYkid7704JWAB2mw32I1HgshQ== @@ -5494,10 +4663,10 @@ "@walletconnect/logger" "^2.0.1" events "^3.3.0" -"@walletconnect/types@2.13.1", "@walletconnect/types@^2.12.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.1.tgz#393e3bd4d60a755f3a70cbe769b58cf153450310" - integrity sha512-CIrdt66d38xdunGCy5peOOP17EQkCEGKweXc3+Gn/RWeSiRU35I7wjC/Bp4iWcgAQ6iBTZv4jGGST5XyrOp+Pg== +"@walletconnect/types@2.17.1": + version "2.17.1" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.17.1.tgz#425dedbe5853231252d081f61448c55ecd341c96" + integrity sha512-aiUeBE3EZZTsZBv5Cju3D0PWAsZCMks1g3hzQs9oNtrbuLL6pKKU0/zpKwk4vGywszxPvC3U0tBCku9LLsH/0A== dependencies: "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" @@ -5506,7 +4675,7 @@ "@walletconnect/logger" "2.1.2" events "3.3.0" -"@walletconnect/types@2.17.2": +"@walletconnect/types@2.17.2", "@walletconnect/types@^2.13.2": version "2.17.2" resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.17.2.tgz#f9afff242563be33f377de689b03b482f5b20aee" integrity sha512-j/+0WuO00lR8ntu7b1+MKe/r59hNwYLFzW0tTmozzhfAlDL+dYwWasDBNq4AH8NbVd7vlPCQWmncH7/6FVtOfQ== @@ -5571,27 +4740,33 @@ query-string "7.1.3" uint8arrays "^3.1.0" -"@walletconnect/utils@2.13.1", "@walletconnect/utils@^2.10.1", "@walletconnect/utils@^2.13.0": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.1.tgz#f44e81028754c6e056dba588ad9b9fa5ad047645" - integrity sha512-EcooXXlqy5hk9hy/nK2wBF/qxe7HjH0K8ZHzjKkXRkwAE5pCvy0IGXIXWmUR9sw8LFJEqZyd8rZdWLKNUe8hqA== +"@walletconnect/utils@2.17.1": + version "2.17.1" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.17.1.tgz#fc57ffb89fc101fa1bf015de016ea01091d10ae0" + integrity sha512-KL7pPwq7qUC+zcTmvxGqIyYanfHgBQ+PFd0TEblg88jM7EjuDLhjyyjtkhyE/2q7QgR7OanIK7pCpilhWvBsBQ== dependencies: + "@ethersproject/hash" "5.7.0" + "@ethersproject/transactions" "5.7.0" "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" "@stablelib/random" "1.0.2" "@stablelib/sha256" "1.0.1" "@stablelib/x25519" "1.0.3" - "@walletconnect/relay-api" "1.0.10" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/relay-api" "1.0.11" + "@walletconnect/relay-auth" "1.0.4" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" + "@walletconnect/types" "2.17.1" "@walletconnect/window-getters" "1.0.1" "@walletconnect/window-metadata" "1.0.1" detect-browser "5.3.0" + elliptic "6.5.7" query-string "7.1.3" uint8arrays "3.1.0" -"@walletconnect/utils@2.17.2": +"@walletconnect/utils@2.17.2", "@walletconnect/utils@^2.10.1", "@walletconnect/utils@^2.13.2": version "2.17.2" resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.17.2.tgz#b4b12e3f5ebbfd883b2a5c87fb818e53501dc7ea" integrity sha512-T7eLRiuw96fgwUy2A5NZB5Eu87ukX8RCVoO9lji34RFV4o2IGU9FhTEWyd4QQKI8OuQRjSknhbJs0tU0r0faPw== @@ -5617,19 +4792,19 @@ query-string "7.1.3" uint8arrays "3.1.0" -"@walletconnect/web3wallet@^1.11.2": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@walletconnect/web3wallet/-/web3wallet-1.12.1.tgz#efe7863c6518b2262bca1ea01650222986963cc4" - integrity sha512-34h7UkWjZvZdtCc/t6tZCSBPjDzJbfG1+OPkJ6FiD1KJP+a0wSwuI7l4LliGgvAdsXfrM+sn3ZEWVWy62zeRDA== +"@walletconnect/web3wallet@^1.12.2": + version "1.16.1" + resolved "https://registry.yarnpkg.com/@walletconnect/web3wallet/-/web3wallet-1.16.1.tgz#53abb98fea6f1ac77704d4e4c91288e0300f2fb9" + integrity sha512-l6jVoLEh/UtRfvYUDs52fN+LYXsBgx3F9WfErJuCSCFfpbxDKIzM2Y9sI0WI1/5dWN5sh24H1zNCXnQ4JJltZw== dependencies: "@walletconnect/auth-client" "2.1.2" - "@walletconnect/core" "2.13.1" + "@walletconnect/core" "2.17.1" "@walletconnect/jsonrpc-provider" "1.0.14" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "2.1.2" - "@walletconnect/sign-client" "2.13.1" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" + "@walletconnect/sign-client" "2.17.1" + "@walletconnect/types" "2.17.1" + "@walletconnect/utils" "2.17.1" "@walletconnect/window-getters@1.0.1", "@walletconnect/window-getters@^1.0.1": version "1.0.1" @@ -5651,10 +4826,10 @@ abitype@1.0.0: resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.0.tgz#237176dace81d90d018bebf3a45cb42f2a2d9e97" integrity sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ== -abitype@1.0.6, abitype@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.6.tgz#76410903e1d88e34f1362746e2d407513c38565b" - integrity sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A== +abitype@1.0.7, abitype@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.7.tgz#876a0005d211e1c9132825d45bcee7b46416b284" + integrity sha512-ZfYYSktDQUwc2eduYu8C4wOs+RDPmnRYMh7zNfzeMtGGgb0U+6tLGjixUic6mXf5xKKCcgT5Qp6cv39tOARVFw== abort-controller@^3.0.0: version "3.0.0" @@ -5664,9 +4839,9 @@ abort-controller@^3.0.0: event-target-shim "^5.0.0" abortcontroller-polyfill@^1.7.5: - version "1.7.5" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" - integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== + version "1.7.8" + resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.8.tgz#fe8d4370403f02e2aa37e3d2b0b178bae9d83f49" + integrity sha512-9f1iZ2uWh92VcrU9Y8x+LdM4DLj75VE0MJB8zuF1iUnroEptStw+DQ8EQPMUdfe5k+PkB1uUfDQfWbhstH8LrQ== abstract-logging@^2.0.1: version "2.0.1" @@ -5683,15 +4858,10 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.11.3, acorn@^8.8.2: - version "8.12.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" - integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== - -acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +acorn@^8.14.0, acorn@^8.8.2, acorn@^8.9.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== aes-js@3.0.0: version "3.0.0" @@ -5705,12 +4875,10 @@ agent-base@6: dependencies: debug "4" -agent-base@^7.0.2: - version "7.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" - integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== - dependencies: - debug "^4.3.4" +agent-base@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.3.tgz#29435eb821bc4194633a5b89e5bc4703bafc25a1" + integrity sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw== ajv-formats@^2.1.1: version "2.1.1" @@ -5727,14 +4895,14 @@ ajv-formats@^3.0.1: ajv "^8.0.0" ajv@^8.0.0, ajv@^8.10.0, ajv@^8.11.0: - version "8.14.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.14.0.tgz#f514ddfd4756abb200e1704414963620a625ebbb" - integrity sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.4.1" ansi-regex@^5.0.1: version "5.0.1" @@ -5742,16 +4910,9 @@ ansi-regex@^5.0.1: integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" + version "6.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" + integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" @@ -5844,9 +5005,9 @@ async-mutex@^0.2.6: tslib "^2.0.0" async@^3.2.3: - version "3.2.5" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" - integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== asynckit@^0.4.0: version "0.4.0" @@ -5866,9 +5027,9 @@ available-typed-arrays@^1.0.7: possible-typed-array-names "^1.0.0" avvio@^8.3.0: - version "8.3.2" - resolved "https://registry.yarnpkg.com/avvio/-/avvio-8.3.2.tgz#cb5844a612e8421d1f3aef8895ef7fa12f73563f" - integrity sha512-st8e519GWHa/azv8S87mcJvZs4WsgTBjOw/Ih1CP6u+8SZvcOeAYNG6JbsIrAUUJJ7JfmrnOkR8ipDS+u9SIRQ== + version "8.4.0" + resolved "https://registry.yarnpkg.com/avvio/-/avvio-8.4.0.tgz#7cbd5bca74f0c9effa944ced601f94ffd8afc5ed" + integrity sha512-CDSwaxINFy59iNwhYnkvALBwZiTydGkOecZyPkqBpABYR1KqGEsET0VOOYDwtleZSUIdeY36DC2bSZ24CO1igA== dependencies: "@fastify/error" "^3.3.0" fastq "^1.17.1" @@ -5885,9 +5046,9 @@ aws-kms-signer@^0.5.3: secp256k1 "4.0" aws-sdk@^2.922.0: - version "2.1632.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1632.0.tgz#24bd0bd000f500300f7d52ac4c6e316a0311e25d" - integrity sha512-doNHUxto00r7r9qWb5RcIsQHUTHdGiPPyJoXxmsmQW6aOr69BqYeuFl8SicNS1YzP6s5sFFnDNKq9KB7jA2fyA== + version "2.1692.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1692.0.tgz#9dac5f7bfcc5ab45825cc8591b12753aa7d2902c" + integrity sha512-x511uiJ/57FIsbgUe5csJ13k3uzu25uWQE+XqfBis/sB0SFoiElJWXRkgEAUh0U6n40eT3ay5Ue4oPkRMu1LYw== dependencies: buffer "4.9.2" events "1.1.1" @@ -5900,15 +5061,15 @@ aws-sdk@^2.922.0: uuid "8.0.0" xml2js "0.6.2" -aws4fetch@1.0.18: - version "1.0.18" - resolved "https://registry.yarnpkg.com/aws4fetch/-/aws4fetch-1.0.18.tgz#417079ed66383cdd5875e04e9a1ff460917f3896" - integrity sha512-3Cf+YaUl07p24MoQ46rFwulAmiyCwH2+1zw1ZyPAX5OtJ34Hh185DwB8y/qRLb6cYYYtSFJ9pthyLc0MD4e8sQ== +aws4fetch@1.0.20: + version "1.0.20" + resolved "https://registry.yarnpkg.com/aws4fetch/-/aws4fetch-1.0.20.tgz#090d6c65e32c6df645dd5e5acf04cc56da575cbe" + integrity sha512-/djoAN709iY65ETD6LKCtyyEI04XIBP5xVvfmNxsEP0uJB5tyaGBztSryRr4HqMStr9R06PisQE7m9zDTXKu6g== axios@>=1.7.8, axios@^0.21.0, axios@^0.27.2: - version "1.7.8" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.8.tgz#1997b1496b394c21953e68c14aaa51b7b5de3d6e" - integrity sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw== + version "1.7.9" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a" + integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -5934,9 +5095,9 @@ base-64@^1.0.0: integrity sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg== base-x@^3.0.2: - version "3.0.9" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + version "3.0.10" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.10.tgz#62de58653f8762b5d6f8d9fe30fa75f7b2585a75" + integrity sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ== dependencies: safe-buffer "^5.0.1" @@ -5985,15 +5146,15 @@ bn.js@5.2.0: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== -bn.js@5.2.1, bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@5.2.1, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + version "4.12.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.1.tgz#215741fe3c9dba2d7e12c001d0cfdbae43975ba7" + integrity sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg== body-parser@>=1.20.3: version "1.20.3" @@ -6057,7 +5218,7 @@ browserify-aes@^1.0.4, browserify-aes@^1.2.0: inherits "^2.0.1" safe-buffer "^5.0.1" -browserify-cipher@^1.0.0: +browserify-cipher@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== @@ -6077,14 +5238,15 @@ browserify-des@^1.0.0: safe-buffer "^5.1.2" browserify-rsa@^4.0.0, browserify-rsa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + version "4.1.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.1.tgz#06e530907fe2949dc21fc3c2e2302e10b1437238" + integrity sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ== dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" + bn.js "^5.2.1" + randombytes "^2.1.0" + safe-buffer "^5.2.1" -browserify-sign@^4.0.0: +browserify-sign@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.3.tgz#7afe4c01ec7ee59a89a558a4b75bd85ae62d4208" integrity sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw== @@ -6170,9 +5332,9 @@ bufferutil@^4.0.1: node-gyp-build "^4.3.0" bufio@^1.0.7: - version "1.2.1" - resolved "https://registry.yarnpkg.com/bufio/-/bufio-1.2.1.tgz#8d4ab3ddfcd5faa90f996f922f9397d41cbaf2de" - integrity sha512-9oR3zNdupcg/Ge2sSHQF3GX+kmvL/fTPvD0nd5AGLq8SjUYnTz+SlFjK/GXidndbZtIj+pVKXiWeR9w6e9wKCA== + version "1.2.2" + resolved "https://registry.yarnpkg.com/bufio/-/bufio-1.2.2.tgz#60a1b21e176cc9d432d4a6c52a01312e735d1753" + integrity sha512-sTsA0ka7sjge/bGUfjk00O/8kNfyeAvJjXXeyvgbXefIrf5GTp99W71qfmCP6FGHWbr4A0IjjM7dFj6bHXVMlw== builtin-status-codes@^3.0.0: version "3.0.0" @@ -6180,13 +5342,13 @@ builtin-status-codes@^3.0.0: integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== bullmq@^5.11.0: - version "5.11.0" - resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-5.11.0.tgz#15c526d4a45453843b36cc34bdcaa5249772d22e" - integrity sha512-qVzyWGZqie3VHaYEgRXhId/j8ebfmj6MExEJyUByMsUJA5pVciVle3hKLer5fyMwtQ8lTMP7GwhXV/NZ+HzlRA== + version "5.34.0" + resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-5.34.0.tgz#66252d9931ac973fe2d028d57564ea7a5157b2be" + integrity sha512-TyzeYDkIGkooYUn/P1CeiJW3Am1TboC3unwhlg1cJIwKksoyuRp97TkHyCZcwLchXbYCUtsGBZFUYf/lTAhdSg== dependencies: cron-parser "^4.6.0" ioredis "^5.4.1" - msgpackr "^1.10.1" + msgpackr "^1.11.2" node-abort-controller "^3.1.1" semver "^7.5.4" tslib "^2.0.0" @@ -6202,16 +5364,31 @@ cac@^6.7.14: resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== -call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== dependencies: - es-define-property "^1.0.0" es-errors "^1.3.0" function-bind "^1.1.2" + +call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.7, call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" get-intrinsic "^1.2.4" - set-function-length "^1.2.1" + set-function-length "^1.2.2" + +call-bound@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.2.tgz#9dbd4daf9f5f753bec3e4c8fbb8a2ecc4de6c39b" + integrity sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg== + dependencies: + call-bind "^1.0.8" + get-intrinsic "^1.2.5" call-me-maybe@^1.0.1: version "1.0.2" @@ -6241,9 +5418,9 @@ catharsis@^0.9.0: lodash "^4.17.15" chai@^4.3.10, chai@^4.3.4: - version "4.4.1" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" - integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== + version "4.5.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== dependencies: assertion-error "^1.1.0" check-error "^1.0.3" @@ -6251,12 +5428,12 @@ chai@^4.3.10, chai@^4.3.4: get-func-name "^2.0.2" loupe "^2.3.6" pathval "^1.1.1" - type-detect "^4.0.8" + type-detect "^4.1.0" -chai@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/chai/-/chai-5.1.1.tgz#f035d9792a22b481ead1c65908d14bb62ec1c82c" - integrity sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA== +chai@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/chai/-/chai-5.1.2.tgz#3afbc340b994ae3610ca519a6c70ace77ad4378d" + integrity sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw== dependencies: assertion-error "^2.0.1" check-error "^2.1.1" @@ -6264,15 +5441,6 @@ chai@^5.1.1: loupe "^3.1.0" pathval "^2.0.0" -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^4.0.0, chalk@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -6342,12 +5510,12 @@ cids@^1.0.0: uint8arrays "^3.0.0" cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + version "1.0.6" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.6.tgz#8fe672437d01cd6c4561af5334e0cc50ff1955f7" + integrity sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + safe-buffer "^5.2.1" citty@^0.1.5, citty@^0.1.6: version "0.1.6" @@ -6357,9 +5525,9 @@ citty@^0.1.5, citty@^0.1.6: consola "^3.2.3" cjs-module-lexer@^1.2.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" - integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== + version "1.4.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" + integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA== clipboardy@^4.0.0: version "4.0.0" @@ -6407,7 +5575,7 @@ cluster-key-slot@^1.1.0: resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz#88ddaa46906e303b5de30d3153b7d9fe0a0c19ac" integrity sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA== -color-convert@^1.9.0, color-convert@^1.9.3: +color-convert@^1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -6482,10 +5650,10 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -confbox@^0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.7.tgz#ccfc0a2bcae36a84838e83a3b7f770fb17d6c579" - integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== +confbox@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.8.tgz#820d73d3b3c82d9bd910652c5d4d599ef8ff8b06" + integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== consola@^3.2.3: version "3.2.3" @@ -6519,20 +5687,20 @@ convert-source-map@^1.5.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== -cookie-es@^1.1.0: +cookie-es@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.2.2.tgz#18ceef9eb513cac1cb6c14bcbf8bdb2679b34821" integrity sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg== cookie-signature@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.2.1.tgz#790dea2cce64638c7ae04d9fabed193bd7ccf3b4" - integrity sha512-78KWk9T26NhzXtuL26cIJ8/qNHANyJ/ZYrmEXFzUmhZdjpBv+DlWlOANRTGBt48YcyslsLrj0bMLFTmXvLRCOw== + version "1.2.2" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.2.2.tgz#57c7fc3cc293acab9fec54d73e15690ebe4a1793" + integrity sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg== -cookie@>=0.7.0, cookie@^0.6.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.1.tgz#e1a00d20420e0266aff817815640289eef142751" - integrity sha512-Xd8lFX4LM9QEEwxQpF9J9NTUh8pmdJO0cyRJhFiDoLTk2eH8FXlRv2IFGYVadZpqI3j8fhNrSdKCeYPxiAhLXw== +cookie@>=0.7.0, cookie@^0.6.0, cookie@^0.7.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610" + integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA== cookiejar@^2.1.1: version "2.1.4" @@ -6567,7 +5735,7 @@ crc-32@^1.2.0: resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== -create-ecdh@^4.0.0: +create-ecdh@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== @@ -6586,7 +5754,7 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: +create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -6628,27 +5796,30 @@ cross-spawn@>=7.0.6, cross-spawn@^7.0.0, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crossws@^0.2.0, crossws@^0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.2.4.tgz#82a8b518bff1018ab1d21ced9e35ffbe1681ad03" - integrity sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg== +"crossws@>=0.2.0 <0.4.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.3.1.tgz#7980e0b6688fe23286661c3ab8deeccbaa05ca86" + integrity sha512-HsZgeVYaG+b5zA+9PbIPGq4+J/CJynJuearykPsXx4V/eMhyQ5EDVg3Ak2FBZtVXCiOLu/U7IiwDHTr9MA+IKw== + dependencies: + uncrypto "^0.1.3" crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + version "3.12.1" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.1.tgz#bb8921bec9acc81633379aa8f52d69b0b69e0dac" + integrity sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ== dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" + browserify-cipher "^1.0.1" + browserify-sign "^4.2.3" + create-ecdh "^4.0.4" + create-hash "^1.2.0" + create-hmac "^1.1.7" + diffie-hellman "^5.0.3" + hash-base "~3.0.4" + inherits "^2.0.4" + pbkdf2 "^3.1.2" + public-encrypt "^4.0.3" + randombytes "^2.1.0" + randomfill "^1.0.4" crypto-js@^4.2.0: version "4.2.0" @@ -6684,16 +5855,18 @@ dc-polyfill@^0.1.4: integrity sha512-UV33cugmCC49a5uWAApM+6Ev9ZdvIUMTrtCO9fj96TPGOQiea54oeO3tiEVdVeo3J9N2UdJEmbS4zOkkEA35uQ== dd-trace@^5.23.0: - version "5.24.0" - resolved "https://registry.yarnpkg.com/dd-trace/-/dd-trace-5.24.0.tgz#971fcb53edec4023619642a1716e063987bf0c00" - integrity sha512-KJX/2ZRShuNafNaUkcWPwbIdq4bU1HQ0FrhPJWgKvljwAtNETeRhjac9nEe1fH2A9fTCGg5XCXifvK9Wr5g4xQ== + version "5.28.0" + resolved "https://registry.yarnpkg.com/dd-trace/-/dd-trace-5.28.0.tgz#70d10d9b6372fe7f54d539026a53f8a1b10ea8d3" + integrity sha512-jyF7JLx2Yw16MHcD97sYKXbVd7ZT1hKJ5/NkRRGeG9cgen5+d/ilIvfzgh2qRjeow+9a5ligoZoUOYJ3nYn9hw== dependencies: - "@datadog/native-appsec" "8.1.1" + "@datadog/libdatadog" "^0.2.2" + "@datadog/native-appsec" "8.3.0" "@datadog/native-iast-rewriter" "2.5.0" - "@datadog/native-iast-taint-tracking" "3.1.0" - "@datadog/native-metrics" "^2.0.0" - "@datadog/pprof" "5.3.0" + "@datadog/native-iast-taint-tracking" "3.2.0" + "@datadog/native-metrics" "^3.0.1" + "@datadog/pprof" "5.4.1" "@datadog/sketches-js" "^2.1.0" + "@isaacs/ttlcache" "^1.4.1" "@opentelemetry/api" ">=1.0.0 <1.9.0" "@opentelemetry/core" "^1.14.0" crypto-randomuuid "^1.0.0" @@ -6726,12 +5899,12 @@ debug@2.6.9, debug@^2.2.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@^4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== +debug@4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@^4.3.7: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: - ms "2.1.2" + ms "^2.1.3" debug@4.3.4: version "4.3.4" @@ -6751,9 +5924,9 @@ decode-uri-component@^0.2.2: integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== deep-eql@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" - integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== + version "4.1.4" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== dependencies: type-detect "^4.0.0" @@ -6838,6 +6011,11 @@ detect-libc@^1.0.3: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== +detect-libc@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" + integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -6848,7 +6026,7 @@ detect-node-es@^1.1.0: resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== -diffie-hellman@^5.0.0: +diffie-hellman@^5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== @@ -6873,9 +6051,18 @@ dotenv@^10.0.0: integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== dotenv@^16.0.3: - version "16.4.5" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" - integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + version "16.4.7" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" + integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== + +dunder-proto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.0.tgz#c2fce098b3c8f8899554905f4377b6d85dabaa80" + integrity sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-errors "^1.3.0" + gopd "^1.2.0" duplexify@^4.0.0, duplexify@^4.1.2: version "4.1.3" @@ -6918,10 +6105,10 @@ ejs@^3.1.10: dependencies: jake "^10.8.5" -elliptic@6.5.4, elliptic@6.6.0, elliptic@>=6.6.0, elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.5, elliptic@^6.5.7: - version "6.6.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.0.tgz#5919ec723286c1edf28685aa89261d4761afa210" - integrity sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA== +elliptic@6.5.4, elliptic@6.5.7, elliptic@6.6.0, elliptic@>=6.6.0, elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.5, elliptic@^6.5.7: + version "6.6.1" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.1.tgz#3b8ffb02670bf69e382c7f65bf524c97c5405c06" + integrity sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g== dependencies: bn.js "^4.11.9" brorand "^1.1.0" @@ -6977,18 +6164,28 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" +es-define-property@^1.0.0, es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-module-lexer@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" + integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== + +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + es5-ext@^0.10.35, es5-ext@^0.10.62, es5-ext@^0.10.63, es5-ext@^0.10.64, es5-ext@~0.10.14: version "0.10.64" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" @@ -7051,20 +6248,15 @@ esbuild@^0.21.3: "@esbuild/win32-x64" "0.21.5" escalade@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - escape-string-regexp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" @@ -7166,9 +6358,9 @@ eth-json-rpc-filters@^6.0.0: pify "^5.0.0" eth-provider@^0.13.6: - version "0.13.6" - resolved "https://registry.yarnpkg.com/eth-provider/-/eth-provider-0.13.6.tgz#664ad8a5b0aa5db41ff419e6cc1081b4588f1c12" - integrity sha512-/i0qSQby/rt3CCZrNVlgBdCUYQBwULStFRlBt7+ULNVpwbsYWl9VWXFaQxsbJLOo0x7swRS3OknIdlxlunsGJw== + version "0.13.7" + resolved "https://registry.yarnpkg.com/eth-provider/-/eth-provider-0.13.7.tgz#f7bec9c255724f54792a6c9a6e3a30e70c4fefe6" + integrity sha512-D07HcKBQ0+liERDbkwpex03Y5D7agOMBv8NMkGu0obmD+vHzP9q8jI/tkZMfYAhbfXwpudEgXKiJODXH5UQu7g== dependencies: ethereum-provider "0.7.7" events "3.3.0" @@ -7214,14 +6406,14 @@ ethereum-cryptography@^0.1.3: setimmediate "^1.0.5" ethereum-cryptography@^2.0.0: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz#1352270ed3b339fe25af5ceeadcf1b9c8e30768a" - integrity sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA== + version "2.2.1" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz#58f2810f8e020aecb97de8c8c76147600b0b8ccf" + integrity sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg== dependencies: - "@noble/curves" "1.3.0" - "@noble/hashes" "1.3.3" - "@scure/bip32" "1.3.3" - "@scure/bip39" "1.2.2" + "@noble/curves" "1.4.2" + "@noble/hashes" "1.4.0" + "@scure/bip32" "1.4.0" + "@scure/bip39" "1.3.0" ethereum-provider@0.7.7: version "0.7.7" @@ -7446,9 +6638,9 @@ execa@^8.0.1: strip-final-newline "^3.0.0" execa@^9.1.0: - version "9.5.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-9.5.1.tgz#ab9b68073245e1111bba359962a34fcdb28deef2" - integrity sha512-QY5PPtSonnGwhhHDNI7+3RvY285c7iuJFFB+lU+oEzMY/gEGJ808owqJsrr8Otd1E/x07po1LkUBmdAc5duPAg== + version "9.5.2" + resolved "https://registry.yarnpkg.com/execa/-/execa-9.5.2.tgz#a4551034ee0795e241025d2f987dab3f4242dff2" + integrity sha512-EHlpxMCpHWSAh1dgS6bVeoLAXGnJNdR93aabr4QCGbzOM73o5XmRfM/e5FUqsw3aagP8S8XEWUWFAxnRBnAF0Q== dependencies: "@sindresorhus/merge-streams" "^4.0.0" cross-spawn "^7.0.3" @@ -7463,6 +6655,11 @@ execa@^9.1.0: strip-final-newline "^4.0.0" yoctocolors "^2.0.0" +expect-type@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/expect-type/-/expect-type-1.1.0.tgz#a146e414250d13dfc49eafcfd1344a4060fa4c75" + integrity sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA== + explain-error@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/explain-error/-/explain-error-1.0.4.tgz#a793d3ac0cad4c6ab571e9968fbbab6cb2532929" @@ -7496,9 +6693,9 @@ fast-deep-equal@^3.1.3: integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-json-stringify@^5.7.0, fast-json-stringify@^5.8.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-5.16.0.tgz#e35baa9f85a61f81680b2845969f91bd02d1b30e" - integrity sha512-A4bg6E15QrkuVO3f0SwIASgzMzR6XC4qTyTqhf3hYXy0iazbAdZKwkE+ox4WgzKyzM6ygvbdq3r134UjOaaAnA== + version "5.16.1" + resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-5.16.1.tgz#a6d0c575231a3a08c376a00171d757372f2ca46e" + integrity sha512-KAdnLvy1yu/XrRtP+LJnxbBGrhN+xXu+gt3EUvZhYGKCr3lFHq/7UFJHHFgmJKoqlh6B40bZLEv7w46B0mqn1g== dependencies: "@fastify/merge-json-schemas" "^0.1.0" ajv "^8.10.0" @@ -7536,9 +6733,14 @@ fast-text-encoding@^1.0.0, fast-text-encoding@^1.0.3, fast-text-encoding@^1.0.6: integrity sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w== fast-uri@^2.0.0, fast-uri@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-2.3.0.tgz#bdae493942483d299e7285dcb4627767d42e2793" - integrity sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw== + version "2.4.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-2.4.0.tgz#67eae6fbbe9f25339d5d3f4c4234787b65d7d55e" + integrity sha512-ypuAmmMKInk5q7XcepxlnUWDLWv4GFtaJqAzWKqn62IpQ3pejtr5dTVbt3vwqVaMKmkNR55sTT+CqUKIaT21BA== + +fast-uri@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.3.tgz#892a1c91802d5d7860de728f18608a0573142241" + integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw== fast-xml-parser@4.4.1: version "4.4.1" @@ -7560,9 +6762,9 @@ fastify-type-provider-zod@^1.1.9: zod-to-json-schema "^3.23.0" fastify@^4.28.1: - version "4.28.1" - resolved "https://registry.yarnpkg.com/fastify/-/fastify-4.28.1.tgz#39626dedf445d702ef03818da33064440b469cd1" - integrity sha512-kFWUtpNr4i7t5vY2EJPCN2KgMVpuqfU4NjnJNCgiNB900oiDeYqaNDRcAfeBbOF5hGixixxcKnOU4KN9z6QncQ== + version "4.29.0" + resolved "https://registry.yarnpkg.com/fastify/-/fastify-4.29.0.tgz#ea3fcd92f4d9deaa841a6722dc6e3e7ff9392850" + integrity sha512-MaaUHUGcCgC8fXQDsDtioaCcag1fmPJ9j64vAKunqZF4aSub040ZGi/ag8NGE2714yREPOKZuHCfpPzuUD3UQQ== dependencies: "@fastify/ajv-compiler" "^3.5.0" "@fastify/error" "^3.4.0" @@ -7619,14 +6821,14 @@ filter-obj@^1.1.0: resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== -find-my-way@>=8.2.2, find-my-way@^8.0.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/find-my-way/-/find-my-way-9.1.0.tgz#df941d61198b6380bc962250652c2dff43468880" - integrity sha512-Y5jIsuYR4BwWDYYQ2A/RWWE6gD8a0FMgtU+HOq1WKku+Cwdz8M1v8wcAmRXXM1/iqtoqg06v+LjAxMYbCjViMw== +find-my-way@^8.0.0: + version "8.2.2" + resolved "https://registry.yarnpkg.com/find-my-way/-/find-my-way-8.2.2.tgz#f3e78bc6ead2da4fdaa201335da3228600ed0285" + integrity sha512-Dobi7gcTEq8yszimcfp/R7+owiT4WncAJ7VTTgFH1jYJ5GaG1FbhjwDG820hptN0QDFvzVY3RfCzdInvGPGzjA== dependencies: fast-deep-equal "^3.1.3" fast-querystring "^1.0.0" - safe-regex2 "^4.0.0" + safe-regex2 "^3.1.0" find-root@^1.1.0: version "1.1.0" @@ -7646,16 +6848,11 @@ fn.name@1.x.x: resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== -follow-redirects@^1.0.0: +follow-redirects@^1.0.0, follow-redirects@^1.15.6: version "1.15.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== -follow-redirects@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -7664,26 +6861,27 @@ for-each@^0.3.3: is-callable "^1.1.3" foreground-child@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7" - integrity sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA== + version "3.3.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" + integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== dependencies: cross-spawn "^7.0.0" signal-exit "^4.0.1" form-data@^2.5.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + version "2.5.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.2.tgz#dc653743d1de2fcc340ceea38079daf6e9069fd2" + integrity sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q== dependencies: asynckit "^0.4.0" combined-stream "^1.0.6" mime-types "^2.1.12" + safe-buffer "^5.2.1" form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + version "4.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" + integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" @@ -7708,7 +6906,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2, fsevents@~2.3.3: +fsevents@2.3.3, fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -7734,9 +6932,9 @@ gaxios@^5.0.0, gaxios@^5.0.1: node-fetch "^2.6.9" gaxios@^6.0.0, gaxios@^6.1.1: - version "6.6.0" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-6.6.0.tgz#af8242fff0bbb82a682840d5feaa91b6a1c58be4" - integrity sha512-bpOZVQV5gthH/jVCSuYuokRo2bTKOcuBiVWpjmTn6C5Agl5zclGfTljuGsQZxwwDBkli+YhZhP4TdlqTnhOezQ== + version "6.7.1" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-6.7.1.tgz#ebd9f7093ede3ba502685e73390248bb5b7f71fb" + integrity sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ== dependencies: extend "^3.0.2" https-proxy-agent "^7.0.1" @@ -7770,16 +6968,21 @@ get-func-name@^2.0.1, get-func-name@^2.0.2: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== +get-intrinsic@^1.2.4, get-intrinsic@^1.2.5: + version "1.2.6" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5" + integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA== dependencies: + call-bind-apply-helpers "^1.0.1" + dunder-proto "^1.0.0" + es-define-property "^1.0.1" es-errors "^1.3.0" + es-object-atoms "^1.0.0" function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.0.0" get-nonce@^1.0.0: version "1.0.1" @@ -7870,9 +7073,9 @@ google-auth-library@^8.0.2: lru-cache "^6.0.0" google-auth-library@^9.3.0: - version "9.10.0" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-9.10.0.tgz#c9fb940923f7ff2569d61982ee1748578c0bbfd4" - integrity sha512-ol+oSa5NbcGdDqA+gZ3G3mev59OHBZksBTxY/tYwjtcp1H/scAFwJfSQU9/1RALoyZ7FslNbke8j4i3ipwlyuQ== + version "9.15.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-9.15.0.tgz#1b009c08557929c881d72f953f17e839e91b009b" + integrity sha512-7ccSEJFDFO7exFbO6NRyC+xH8/mZ1GZGG2xxx9iHxZWcjUjJpjWxIMw3cofAKcueZ6DATiukmmprD7yavQHOyQ== dependencies: base64-js "^1.3.0" ecdsa-sig-formatter "^1.0.11" @@ -7903,20 +7106,20 @@ google-gax@^3.0.1, google-gax@^3.5.8: retry-request "^5.0.0" google-gax@^4.0.3: - version "4.3.5" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-4.3.5.tgz#bd0bb662a720b56bfb2fd70c4ed05e715383eab7" - integrity sha512-zXRSGgHp33ottCQMdYlKEFX/MhWkzKVX5P3Vpmx+DW6rtseLILzp3V0YV5Rh4oQzzkM0BH9+nJIyX01EUgmd3g== + version "4.4.1" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-4.4.1.tgz#95a9cf7ee7777ac22d1926a45b5f886dd8beecae" + integrity sha512-Phyp9fMfA00J3sZbJxbbB4jC55b7DBjE3F6poyL3wKMEBVKA79q6BGuHcTiM28yOzVql0NDbRL8MLLh8Iwk9Dg== dependencies: - "@grpc/grpc-js" "~1.10.3" - "@grpc/proto-loader" "^0.7.0" + "@grpc/grpc-js" "^1.10.9" + "@grpc/proto-loader" "^0.7.13" "@types/long" "^4.0.0" abort-controller "^3.0.0" duplexify "^4.0.0" google-auth-library "^9.3.0" - node-fetch "^2.6.1" + node-fetch "^2.7.0" object-hash "^3.0.0" - proto3-json-serializer "^2.0.0" - protobufjs "7.3.0" + proto3-json-serializer "^2.0.2" + protobufjs "^7.3.2" retry-request "^7.0.0" uuid "^9.0.1" @@ -7927,12 +7130,10 @@ google-p12-pem@^4.0.0: dependencies: node-forge "^1.3.1" -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" +gopd@^1.0.1, gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: version "4.2.11" @@ -7956,21 +7157,21 @@ gtoken@^7.0.0: gaxios "^6.0.0" jws "^4.0.0" -h3@^1.10.2, h3@^1.11.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/h3/-/h3-1.12.0.tgz#9d7f05f08a997d263e484b02436cb027df3026d8" - integrity sha512-Zi/CcNeWBXDrFNlV0hUBJQR9F7a96RjMeAZweW/ZWkR9fuXrMcvKnSA63f/zZ9l0GgQOZDVHGvXivNN9PWOwhA== +h3@^1.12.0, h3@^1.13.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/h3/-/h3-1.13.0.tgz#b5347a8936529794b6754b440e26c0ab8a60dceb" + integrity sha512-vFEAu/yf8UMUcB4s43OaDaigcqpQd14yanmOsn+NcRX3/guSKncyE2rOYhq8RIchgJrPSs/QiIddnTTR1ddiAg== dependencies: - cookie-es "^1.1.0" - crossws "^0.2.4" + cookie-es "^1.2.2" + crossws ">=0.2.0 <0.4.0" defu "^6.1.4" destr "^2.0.3" - iron-webcrypto "^1.1.1" - ohash "^1.1.3" + iron-webcrypto "^1.2.1" + ohash "^1.1.4" radix3 "^1.1.2" - ufo "^1.5.3" + ufo "^1.5.4" uncrypto "^0.1.3" - unenv "^1.9.0" + unenv "^1.10.0" handlebars@^4.7.7: version "4.7.8" @@ -7984,11 +7185,6 @@ handlebars@^4.7.7: optionalDependencies: uglify-js "^3.1.4" -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -8001,15 +7197,10 @@ has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: dependencies: es-define-property "^1.0.0" -has-proto@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" - integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== - -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.0.3, has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: version "1.0.2" @@ -8027,13 +7218,13 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash-base@~3.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow== +hash-base@~3.0, hash-base@~3.0.4: + version "3.0.5" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.5.tgz#52480e285395cf7fba17dc4c9e47acdc7f248a8a" + integrity sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + safe-buffer "^5.2.1" hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: version "1.1.7" @@ -8048,7 +7239,7 @@ hashlru@^2.3.0: resolved "https://registry.yarnpkg.com/hashlru/-/hashlru-2.3.0.tgz#5dc15928b3f6961a2056416bb3a4910216fdfb51" integrity sha512-0cMsjjIC8I+D3M44pOQdsy0OHXGLVz6Z0beRuufhKa0KfaD2wGwAev6jILzXsd3/vpnNQJmWyZtIILqM1N+n5A== -hasown@^2.0.0, hasown@^2.0.2: +hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -8139,11 +7330,11 @@ https-proxy-agent@^5.0.0: debug "4" https-proxy-agent@^7.0.1: - version "7.0.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" - integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== + version "7.0.6" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" + integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== dependencies: - agent-base "^7.0.2" + agent-base "^7.1.2" debug "4" human-signals@^5.0.0: @@ -8179,9 +7370,9 @@ ieee754@^1.1.4, ieee754@^1.1.8, ieee754@^1.2.1: integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.2.4: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== immediate@~3.0.5: version "3.0.6" @@ -8224,12 +7415,7 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== -input-otp@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/input-otp/-/input-otp-1.2.4.tgz#9834af8675ac72c7f1b7c010f181b3b4ffdd0f72" - integrity sha512-md6rhmD+zmMnUh5crQNSQxq3keBRYvE3odbr4Qb9g2NWzQv9azi+t1a3X4TBTbh98fsGHgEEJlzbe1q860uGCA== - -input-otp@^1.4.1: +input-otp@^1.2.4, input-otp@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/input-otp/-/input-otp-1.4.1.tgz#bc22e68b14b1667219d54adf74243e37ea79cf84" integrity sha512-+yvpmKYKHi9jIGngxagY9oWiiblPB7+nEO75F2l2o4vs+6vpPZZmUl4tBNYuTCvQjhvEIbdNeJu70bhfYP2nbw== @@ -8271,7 +7457,7 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -iron-webcrypto@^1.1.1: +iron-webcrypto@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz#aa60ff2aa10550630f4c0b11fd2442becdb35a6f" integrity sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg== @@ -8307,9 +7493,9 @@ is-callable@^1.1.3: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.13.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.0.tgz#71c72ec5442ace7e76b306e9d48db361f22699ea" - integrity sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA== + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: hasown "^2.0.2" @@ -8510,10 +7696,10 @@ jest-docblock@^29.7.0: dependencies: detect-newline "^3.0.0" -jiti@^1.21.0: - version "1.21.6" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" - integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== +jiti@^2.1.2: + version "2.4.1" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.4.1.tgz#4de9766ccbfa941d9b6390d2b159a4b295a52e6b" + integrity sha512-yPBThwecp1wS9DmoA4x4KR2h3QoslacnDR8ypuFM962kI4/456Iy1oHx2RAgh4jfZNdn0bctsdadceiBUgpU1g== jmespath@0.16.0: version "0.16.0" @@ -8535,11 +7721,6 @@ js-sha3@^0.9.3: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-tokens@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-9.0.0.tgz#0f893996d6f3ed46df7f0a3b12a03f5fd84223c1" - integrity sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ== - js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -8555,9 +7736,9 @@ js2xmlparser@^4.0.2: xmlcreate "^2.0.4" jsdoc@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-4.0.3.tgz#bfee86c6a82f6823e12b5e8be698fd99ae46c061" - integrity sha512-Nu7Sf35kXJ1MWDZIMAuATRQTg1iIPdzh7tqJ6jjvaU/GfDf+qi5UV8zJR3Mo+/pYFvm8mzay4+6O5EWigaQBQw== + version "4.0.4" + resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-4.0.4.tgz#86565a9e39cc723a3640465b3fb189a22d1206ca" + integrity sha512-zeFezwyXeG4syyYHbvh1A967IAqq/67yXtXvuL5wnqCkFZe8I0vKfm+EO+YEvLguo6w9CDUbrAXVtJSHh2E8rw== dependencies: "@babel/parser" "^7.20.15" "@jsdoc/salty" "^0.2.1" @@ -8575,10 +7756,10 @@ jsdoc@^4.0.0: strip-json-comments "^3.1.0" underscore "~1.13.2" -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== json-bigint@^1.0.0: version "1.0.0" @@ -8769,11 +7950,11 @@ lie@3.1.1: immediate "~3.0.5" light-my-request@^5.11.0: - version "5.13.0" - resolved "https://registry.yarnpkg.com/light-my-request/-/light-my-request-5.13.0.tgz#b29905e55e8605b77fee2a946e17b219bca35113" - integrity sha512-9IjUN9ZyCS9pTG+KqTDEQo68Sui2lHsYBrfMyVUTTZ3XhH8PMZq7xO94Kr+eP9dhi/kcKsx4N41p2IXEBil1pQ== + version "5.14.0" + resolved "https://registry.yarnpkg.com/light-my-request/-/light-my-request-5.14.0.tgz#11ddae56de4053fd5c1845cbfbee5c29e8a257e7" + integrity sha512-aORPWntbpH5esaYpGOOmri0OHDOe3wC5M2MQxZ9dvMLZm6DnaAn0kJlcbU9hwsQgLzmZyReKwFwwPkR+nHu5kA== dependencies: - cookie "^0.6.0" + cookie "^0.7.0" process-warning "^3.0.0" set-cookie-parser "^2.4.1" @@ -8794,27 +7975,27 @@ linkify-it@^5.0.0: dependencies: uc.micro "^2.0.0" -listhen@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/listhen/-/listhen-1.7.2.tgz#66b81740692269d5d8cafdc475020f2fc51afbae" - integrity sha512-7/HamOm5YD9Wb7CFgAZkKgVPA96WwhcTQoqtm2VTZGVbVVn3IWKRBTgrU7cchA3Q8k9iCsG8Osoi9GX4JsGM9g== +listhen@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/listhen/-/listhen-1.9.0.tgz#59355f7e4fc1eefda6bc494ae7e9ed13aa7658ef" + integrity sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg== dependencies: "@parcel/watcher" "^2.4.1" "@parcel/watcher-wasm" "^2.4.1" citty "^0.1.6" clipboardy "^4.0.0" consola "^3.2.3" - crossws "^0.2.0" + crossws ">=0.2.0 <0.4.0" defu "^6.1.4" get-port-please "^3.1.2" - h3 "^1.10.2" + h3 "^1.12.0" http-shutdown "^1.2.2" - jiti "^1.21.0" - mlly "^1.6.1" + jiti "^2.1.2" + mlly "^1.7.1" node-forge "^1.3.1" pathe "^1.1.2" std-env "^3.7.0" - ufo "^1.4.0" + ufo "^1.5.4" untun "^0.1.3" uqr "^0.1.2" @@ -8922,10 +8103,10 @@ lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -logform@^2.6.0, logform@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/logform/-/logform-2.6.1.tgz#71403a7d8cae04b2b734147963236205db9b3df0" - integrity sha512-CdaO738xRapbKIMVn2m4F6KTj4j7ooJ8POVnebSgKo3KBz5axNXRAL7ZdRjIV6NOr2Uf4vjtRkxrFETOioCqSA== +logform@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.7.0.tgz#cfca97528ef290f2e125a08396805002b2d060d1" + integrity sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ== dependencies: "@colors/colors" "1.6.0" "@types/triple-beam" "^1.3.2" @@ -8953,14 +8134,12 @@ loupe@^2.3.6: dependencies: get-func-name "^2.0.1" -loupe@^3.1.0, loupe@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-3.1.1.tgz#71d038d59007d890e3247c5db97c1ec5a92edc54" - integrity sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw== - dependencies: - get-func-name "^2.0.1" +loupe@^3.1.0, loupe@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-3.1.2.tgz#c86e0696804a02218f2206124c45d8b15291a240" + integrity sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg== -lru-cache@^10.2.0: +lru-cache@^10.2.0, lru-cache@^10.4.3: version "10.4.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== @@ -8978,9 +8157,9 @@ lru-cache@^7.14.0: integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== luxon@^3.2.1: - version "3.4.4" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.4.4.tgz#cf20dc27dc532ba41a169c43fdcc0063601577af" - integrity sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA== + version "3.5.0" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.5.0.tgz#6b6f65c5cd1d61d1fd19dbf07ee87a50bf4b8e20" + integrity sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ== magic-sdk@^13.6.2: version "13.6.2" @@ -8992,20 +8171,20 @@ magic-sdk@^13.6.2: "@magic-sdk/types" "^11.6.2" localforage "^1.7.4" -magic-string@^0.30.10: - version "0.30.10" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e" - integrity sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ== +magic-string@^0.30.12: + version "0.30.15" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.15.tgz#d5474a2c4c5f35f041349edaba8a5cb02733ed3c" + integrity sha512-zXeaYRgZ6ldS1RJJUrMrYgNJ4fdwnyI6tVqoiIhyCyv5IVTK9BU8Ic2l253GGETQHxI4HNUwhJ3fjDhKqEoaAw== dependencies: - "@jridgewell/sourcemap-codec" "^1.4.15" + "@jridgewell/sourcemap-codec" "^1.5.0" -magicast@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/magicast/-/magicast-0.3.4.tgz#bbda1791d03190a24b00ff3dd18151e7fd381d19" - integrity sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q== +magicast@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/magicast/-/magicast-0.3.5.tgz#8301c3c7d66704a0771eb1bad74274f0ec036739" + integrity sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ== dependencies: - "@babel/parser" "^7.24.4" - "@babel/types" "^7.24.0" + "@babel/parser" "^7.25.4" + "@babel/types" "^7.25.4" source-map-js "^1.2.0" make-dir@^4.0.0: @@ -9037,6 +8216,11 @@ marked@^4.0.10: resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== +math-intrinsics@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.0.0.tgz#4e04bf87c85aa51e90d078dac2252b4eb5260817" + integrity sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA== + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -9179,15 +8363,15 @@ mkdirp@^3.0.1: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== -mlly@^1.6.1, mlly@^1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.1.tgz#e0336429bb0731b6a8e887b438cbdae522c8f32f" - integrity sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA== +mlly@^1.7.1, mlly@^1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.3.tgz#d86c0fcd8ad8e16395eb764a5f4b831590cee48c" + integrity sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A== dependencies: - acorn "^8.11.3" + acorn "^8.14.0" pathe "^1.1.2" - pkg-types "^1.1.1" - ufo "^1.5.3" + pkg-types "^1.2.1" + ufo "^1.5.4" mnemonist@^0.39.8: version "0.39.8" @@ -9213,11 +8397,6 @@ motion@10.16.2: "@motionone/utils" "^10.15.1" "@motionone/vue" "^10.16.2" -mri@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" - integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -9228,7 +8407,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -9244,23 +8423,23 @@ msgpack-lite@^0.1.26: isarray "^1.0.0" msgpackr-extract@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/msgpackr-extract/-/msgpackr-extract-3.0.2.tgz#e05ec1bb4453ddf020551bcd5daaf0092a2c279d" - integrity sha512-SdzXp4kD/Qf8agZ9+iTu6eql0m3kWm1A2y1hkpTeVNENutaB0BwHlSvAIaMxwntmRUAUjon2V4L8Z/njd0Ct8A== + version "3.0.3" + resolved "https://registry.yarnpkg.com/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz#e9d87023de39ce714872f9e9504e3c1996d61012" + integrity sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA== dependencies: - node-gyp-build-optional-packages "5.0.7" + node-gyp-build-optional-packages "5.2.2" optionalDependencies: - "@msgpackr-extract/msgpackr-extract-darwin-arm64" "3.0.2" - "@msgpackr-extract/msgpackr-extract-darwin-x64" "3.0.2" - "@msgpackr-extract/msgpackr-extract-linux-arm" "3.0.2" - "@msgpackr-extract/msgpackr-extract-linux-arm64" "3.0.2" - "@msgpackr-extract/msgpackr-extract-linux-x64" "3.0.2" - "@msgpackr-extract/msgpackr-extract-win32-x64" "3.0.2" - -msgpackr@^1.10.1: - version "1.10.2" - resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.10.2.tgz#a73de4767f76659e8c69cf9c80fdfce83937a44a" - integrity sha512-L60rsPynBvNE+8BWipKKZ9jHcSGbtyJYIwjRq0VrIvQ08cRjntGXJYW/tmciZ2IHWIY8WEW32Qa2xbh5+SKBZA== + "@msgpackr-extract/msgpackr-extract-darwin-arm64" "3.0.3" + "@msgpackr-extract/msgpackr-extract-darwin-x64" "3.0.3" + "@msgpackr-extract/msgpackr-extract-linux-arm" "3.0.3" + "@msgpackr-extract/msgpackr-extract-linux-arm64" "3.0.3" + "@msgpackr-extract/msgpackr-extract-linux-x64" "3.0.3" + "@msgpackr-extract/msgpackr-extract-win32-x64" "3.0.3" + +msgpackr@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.11.2.tgz#4463b7f7d68f2e24865c395664973562ad24473d" + integrity sha512-F9UngXRlPyWCDEASDpTf6c9uNhGPTqnTeLVt7bN+bU1eajoR/8V9ys2BRaV5C/e5ihE6sJ9uPIKaYt6bFuO32g== optionalDependencies: msgpackr-extract "^3.0.2" @@ -9294,14 +8473,14 @@ multihashes@^4.0.1, multihashes@^4.0.2: varint "^5.0.2" nanoid@^3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" - integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== napi-wasm@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" - integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== + version "1.1.3" + resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.3.tgz#7bb95c88e6561f84880bb67195437b1cfbe99224" + integrity sha512-h/4nMGsHjZDCYmQVNODIrYACVJ+I9KItbG+0si6W/jSjdA9JbWDoU4LLeMXVcEQGHjttI2tuXqDrbGF7qkUHHg== neo-async@^2.6.2: version "2.6.2" @@ -9345,12 +8524,12 @@ node-cron@^3.0.2: dependencies: uuid "8.3.2" -node-fetch-native@^1.6.2, node-fetch-native@^1.6.3, node-fetch-native@^1.6.4: +node-fetch-native@^1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== -node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7, node-fetch@^2.6.9: +node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7, node-fetch@^2.6.9, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -9362,10 +8541,12 @@ node-forge@^1.3.1: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== -node-gyp-build-optional-packages@5.0.7: - version "5.0.7" - resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.7.tgz#5d2632bbde0ab2f6e22f1bbac2199b07244ae0b3" - integrity sha512-YlCCc6Wffkx0kHkmam79GKvDQ6x+QZkMjFGrIMxgFNILFvGSbCp2fCBC55pGTT9gVaz8Na5CLmxt/urtzRv36w== +node-gyp-build-optional-packages@5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz#522f50c2d53134d7f3a76cd7255de4ab6c96a3a4" + integrity sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw== + dependencies: + detect-libc "^2.0.1" node-gyp-build@<4.0, node-gyp-build@^3.9.0: version "3.9.0" @@ -9373,9 +8554,9 @@ node-gyp-build@<4.0, node-gyp-build@^3.9.0: integrity sha512-zLcTg6P4AbcHPq465ZMFNXx7XpKKJh+7kkN699NiQWisR2uWYOWNWqRHAmbnmKiL4e9aLSlmy5U7rEMUXV59+A== node-gyp-build@^4.2.0, node-gyp-build@^4.3.0, node-gyp-build@^4.5.0: - version "4.8.1" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5" - integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw== + version "4.8.4" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.4.tgz#8a70ee85464ae52327772a90d66c6077a900cfc8" + integrity sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ== node-libs-browser@2.2.1: version "2.2.1" @@ -9431,10 +8612,10 @@ object-hash@^3.0.0: resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== -object-inspect@^1.13.1: - version "1.13.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" - integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== +object-inspect@^1.13.3: + version "1.13.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" + integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== object-keys@^1.1.1: version "1.1.1" @@ -9468,19 +8649,19 @@ obuf@~1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== -ofetch@^1.3.3: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.3.4.tgz#7ea65ced3c592ec2b9906975ae3fe1d26a56f635" - integrity sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw== +ofetch@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.4.1.tgz#b6bf6b0d75ba616cef6519dd8b6385a8bae480ec" + integrity sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw== dependencies: destr "^2.0.3" - node-fetch-native "^1.6.3" - ufo "^1.5.3" + node-fetch-native "^1.6.4" + ufo "^1.5.4" -ohash@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.3.tgz#f12c3c50bfe7271ce3fd1097d42568122ccdcf07" - integrity sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== +ohash@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.4.tgz#ae8d83014ab81157d2c285abf7792e2995fadd72" + integrity sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g== on-exit-leak-free@^0.2.0: version "0.2.0" @@ -9571,10 +8752,10 @@ ox@0.1.2: abitype "^1.0.6" eventemitter3 "5.0.1" -ox@0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ox/-/ox-0.2.1.tgz#19386e39d289099f7716a7a5f1e623f97c8027d8" - integrity sha512-BmB0+yDHi/OELuP6zPTtHk0A7sGtUVZ31TUMVlqnnf0Mu834LZegw7RliMsCFSHrL1j62yxdSPIkSLmBM0rD4Q== +ox@0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/ox/-/ox-0.4.1.tgz#e646e1956b6fba73208d1f19045092c3ad1a6b79" + integrity sha512-N6W5Y9j6d7SjW/5lvQfgGNVYqW0oEb70yP9stkNqYICbxqiQvKJgiVYxn2n+yt+PedgcspFd+EtAAk14P4Impg== dependencies: "@adraffy/ens-normalize" "^1.10.1" "@noble/curves" "^1.6.0" @@ -9611,9 +8792,9 @@ p-try@^2.0.0: integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== package-json-from-dist@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" - integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== pako@~1.0.5: version "1.0.11" @@ -9688,9 +8869,9 @@ path-scurry@^1.11.1: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-to-regexp@^0.1.10: - version "0.1.11" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.11.tgz#a527e662c89efc4646dbfa8100bf3e847e495761" - integrity sha512-c0t+KCuUkO/YDLPG4WWzEwx3J5F/GHXsD1h/SNZfySqAIKe/BaP95x8fWtOfRJokpS5yYHRJjMtYlXD8jxnpbw== + version "0.1.12" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" + integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ== path-type@^4.0.0: version "4.0.0" @@ -9712,7 +8893,7 @@ pathval@^2.0.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-2.0.0.tgz#7e2550b422601d4f6b8e26f1301bc8f15a741a25" integrity sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA== -pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.1.2: +pbkdf2@^3.0.17, pbkdf2@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -9733,10 +8914,10 @@ pg-connection-string@2.6.2: resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.6.2.tgz#713d82053de4e2bd166fab70cd4f26ad36aab475" integrity sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA== -pg-connection-string@^2.6.4: - version "2.6.4" - resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.6.4.tgz#f543862adfa49fa4e14bc8a8892d2a84d754246d" - integrity sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA== +pg-connection-string@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.7.0.tgz#f1d3489e427c62ece022dba98d5262efcb168b37" + integrity sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA== pg-int8@1.0.1: version "1.0.1" @@ -9748,15 +8929,15 @@ pg-numeric@1.0.2: resolved "https://registry.yarnpkg.com/pg-numeric/-/pg-numeric-1.0.2.tgz#816d9a44026086ae8ae74839acd6a09b0636aa3a" integrity sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw== -pg-pool@^3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.6.2.tgz#3a592370b8ae3f02a7c8130d245bc02fa2c5f3f2" - integrity sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg== +pg-pool@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.7.0.tgz#d4d3c7ad640f8c6a2245adc369bafde4ebb8cbec" + integrity sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g== -pg-protocol@*, pg-protocol@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.6.1.tgz#21333e6d83b01faaebfe7a33a7ad6bfd9ed38cb3" - integrity sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg== +pg-protocol@*, pg-protocol@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.7.0.tgz#ec037c87c20515372692edac8b63cf4405448a93" + integrity sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ== pg-types@^2.1.0: version "2.2.0" @@ -9783,13 +8964,13 @@ pg-types@^4.0.1: postgres-range "^1.1.1" pg@^8.11.3: - version "8.11.5" - resolved "https://registry.yarnpkg.com/pg/-/pg-8.11.5.tgz#e722b0a5f1ed92931c31758ebec3ddf878dd4128" - integrity sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw== + version "8.13.1" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.13.1.tgz#6498d8b0a87ff76c2df7a32160309d3168c0c080" + integrity sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ== dependencies: - pg-connection-string "^2.6.4" - pg-pool "^3.6.2" - pg-protocol "^1.6.1" + pg-connection-string "^2.7.0" + pg-pool "^3.7.0" + pg-protocol "^1.7.0" pg-types "^2.1.0" pgpass "1.x" optionalDependencies: @@ -9802,12 +8983,7 @@ pgpass@1.x: dependencies: split2 "^4.1.0" -picocolors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== - -picocolors@^1.1.1: +picocolors@^1.0.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -9827,12 +9003,11 @@ pify@^5.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== -pino-abstract-transport@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz#97f9f2631931e242da531b5c66d3079c12c9d1b5" - integrity sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q== +pino-abstract-transport@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-2.0.0.tgz#de241578406ac7b8a33ce0d77ae6e8a0b3b68a60" + integrity sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw== dependencies: - readable-stream "^4.0.0" split2 "^4.0.0" pino-abstract-transport@v0.5.0: @@ -9871,29 +9046,29 @@ pino@7.11.0: thread-stream "^0.15.1" pino@^9.0.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/pino/-/pino-9.1.0.tgz#f734617ad096568cc905e6a227266dbd6100c3fb" - integrity sha512-qUcgfrlyOtjwhNLdbhoL7NR4NkHjzykAPw0V2QLFbvu/zss29h4NkRnibyFzBrNCbzCOY3WZ9hhKSwfOkNggYA== + version "9.5.0" + resolved "https://registry.yarnpkg.com/pino/-/pino-9.5.0.tgz#a7ef0fea868d22d52d8a4ce46e6e03c5dc46fdd6" + integrity sha512-xSEmD4pLnV54t0NOUN16yCl7RIB1c5UUOse5HSyEXtBp+FgFQyPeDutc+Q2ZO7/22vImV7VfEjH/1zV2QuqvYw== dependencies: atomic-sleep "^1.0.0" fast-redact "^3.1.1" on-exit-leak-free "^2.1.0" - pino-abstract-transport "^1.2.0" + pino-abstract-transport "^2.0.0" pino-std-serializers "^7.0.0" - process-warning "^3.0.0" + process-warning "^4.0.0" quick-format-unescaped "^4.0.3" real-require "^0.2.0" safe-stable-stringify "^2.3.1" sonic-boom "^4.0.1" thread-stream "^3.0.0" -pkg-types@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.1.3.tgz#161bb1242b21daf7795036803f28e30222e476e3" - integrity sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA== +pkg-types@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.2.1.tgz#6ac4e455a5bb4b9a6185c1c79abd544c901db2e5" + integrity sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw== dependencies: - confbox "^0.1.7" - mlly "^1.7.1" + confbox "^0.1.8" + mlly "^1.7.2" pathe "^1.1.2" pngjs@^5.0.0: @@ -9974,15 +9149,10 @@ pprof-format@^2.1.0: resolved "https://registry.yarnpkg.com/pprof-format/-/pprof-format-2.1.0.tgz#acc8d7773bcf4faf0a3d3df11bceefba7ac06664" integrity sha512-0+G5bHH0RNr8E5hoZo/zJYsL92MhkZjwrHp3O2IxmY8RJL9ooKeuZ8Tm0ZNBw5sGZ9TiM71sthTjWoR2Vf5/xw== -preact@^10.16.0: - version "10.23.2" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.23.2.tgz#52deec92796ae0f0cc6b034d9c66e0fbc1b837dc" - integrity sha512-kKYfePf9rzKnxOAKDpsWhg/ysrHPqT+yQ7UW4JjdnqjFIeNUnNcEJvhuA8fDenxAGWzUqtd51DfVg7xp/8T9NA== - -preact@^10.24.2: - version "10.25.0" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.25.0.tgz#22a1c93ce97336c5d01d74f363433ab0cd5cde64" - integrity sha512-6bYnzlLxXV3OSpUxLdaxBmE7PMOu0aR3pG6lryK/0jmvcDFPlcXGQAt5DpK3RITWiDrfYZRI0druyaK/S9kYLg== +preact@^10.16.0, preact@^10.24.2: + version "10.25.1" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.25.1.tgz#1c4b84253c42dee874bfbf6a92bdce45e3662665" + integrity sha512-frxeZV2vhQSohQwJ7FvlqC40ze89+8friponWUFeVEkaCfhC6Eu4V0iND5C9CXz8JLndV07QRDeXzH1+Anz5Og== prelude-ls@~1.1.2: version "1.1.2" @@ -9997,11 +9167,13 @@ pretty-ms@^9.0.0: parse-ms "^4.0.0" prisma@^5.14.0: - version "5.17.0" - resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.17.0.tgz#267b43921ab94805b010537cffa5ccaf530fa066" - integrity sha512-m4UWkN5lBE6yevqeOxEvmepnL5cNPEjzMw2IqDB59AcEV6w7D8vGljDLd1gPFH+W6gUxw9x7/RmN5dCS/WTPxA== + version "5.22.0" + resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.22.0.tgz#1f6717ff487cdef5f5799cc1010459920e2e6197" + integrity sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A== dependencies: - "@prisma/engines" "5.17.0" + "@prisma/engines" "5.22.0" + optionalDependencies: + fsevents "2.3.3" process-nextick-args@~2.0.0: version "2.0.1" @@ -10018,6 +9190,11 @@ process-warning@^3.0.0: resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-3.0.0.tgz#96e5b88884187a1dce6f5c3166d611132058710b" integrity sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ== +process-warning@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-4.0.0.tgz#581e3a7a1fb456c5f4fd239f76bce75897682d5a" + integrity sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw== + process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -10050,7 +9227,7 @@ proto3-json-serializer@^1.0.0: dependencies: protobufjs "^7.0.0" -proto3-json-serializer@^2.0.0: +proto3-json-serializer@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/proto3-json-serializer/-/proto3-json-serializer-2.0.2.tgz#5b705203b4d58f3880596c95fad64902617529dd" integrity sha512-SAzp/O4Yh02jGdRc+uIrGoe87dkN/XtwxfZ4ZyafJHymd79ozp5VG5nyZ7ygqPM5+cpLDjjGnYFUkngonyDPOQ== @@ -10091,10 +9268,10 @@ protobufjs@7.2.4: "@types/node" ">=13.7.0" long "^5.0.0" -protobufjs@7.3.0, protobufjs@>=7.2.5, protobufjs@^7.0.0, protobufjs@^7.2.5: - version "7.3.0" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.0.tgz#a32ec0422c039798c41a0700306a6e305b9cb32c" - integrity sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g== +protobufjs@^7.0.0, protobufjs@^7.2.5, protobufjs@^7.3.2: + version "7.4.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.4.0.tgz#7efe324ce9b3b61c82aae5de810d287bc08a248a" + integrity sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -10127,7 +9304,7 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -public-encrypt@^4.0.0: +public-encrypt@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== @@ -10160,11 +9337,11 @@ punycode@^2.1.0: integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== pvtsutils@^1.3.2: - version "1.3.5" - resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.5.tgz#b8705b437b7b134cd7fd858f025a23456f1ce910" - integrity sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA== + version "1.3.6" + resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.6.tgz#ec46e34db7422b9e4fdc5490578c1883657d6001" + integrity sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg== dependencies: - tslib "^2.6.1" + tslib "^2.8.1" pvutils@^1.1.3: version "1.1.3" @@ -10181,13 +9358,20 @@ qrcode@1.5.3: pngjs "^5.0.0" yargs "^15.3.1" -qs@6.13.0, qs@^6.12.3: +qs@6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== dependencies: side-channel "^1.0.6" +qs@^6.12.3: + version "6.13.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.1.tgz#3ce5fc72bd3a8171b85c99b93c65dd20b7d1b16e" + integrity sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg== + dependencies: + side-channel "^1.0.6" + query-string@7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" @@ -10225,7 +9409,7 @@ randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: +randomfill@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== @@ -10309,17 +9493,6 @@ readable-stream@^3.0.0, readable-stream@^3.1.1, readable-stream@^3.4.0, readable string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^4.0.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" - integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - string_decoder "^1.3.0" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -10414,10 +9587,10 @@ resolve@^1.19.0, resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -ret@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.5.0.tgz#30a4d38a7e704bd96dc5ffcbe7ce2a9274c41c95" - integrity sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw== +ret@~0.4.0: + version "0.4.3" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.4.3.tgz#5243fa30e704a2e78a9b9b1e86079e15891aa85c" + integrity sha512-0f4Memo5QP7WQyUEAYUO3esD/XjOc3Zjjg5CPsAq1p8sIu0XPeMbHJemKA0BO7tV0X7+A0FoEpbmHXWxPyD3wQ== retry-request@^5.0.0: version "5.0.2" @@ -10446,12 +9619,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rfdc@^1.1.4, rfdc@^1.2.0, rfdc@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" - integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== - -rfdc@^1.3.1: +rfdc@^1.1.4, rfdc@^1.2.0, rfdc@^1.3.0, rfdc@^1.3.1: version "1.4.1" resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== @@ -10479,30 +9647,31 @@ rlp@^2.2.3, rlp@^2.2.4, rlp@^2.2.7: bn.js "^5.2.0" rollup@^4.20.0: - version "4.27.4" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.27.4.tgz#b23e4ef4fe4d0d87f5237dacf63f95a499503897" - integrity sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw== + version "4.28.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.28.1.tgz#7718ba34d62b449dfc49adbfd2f312b4fe0df4de" + integrity sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg== dependencies: "@types/estree" "1.0.6" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.27.4" - "@rollup/rollup-android-arm64" "4.27.4" - "@rollup/rollup-darwin-arm64" "4.27.4" - "@rollup/rollup-darwin-x64" "4.27.4" - "@rollup/rollup-freebsd-arm64" "4.27.4" - "@rollup/rollup-freebsd-x64" "4.27.4" - "@rollup/rollup-linux-arm-gnueabihf" "4.27.4" - "@rollup/rollup-linux-arm-musleabihf" "4.27.4" - "@rollup/rollup-linux-arm64-gnu" "4.27.4" - "@rollup/rollup-linux-arm64-musl" "4.27.4" - "@rollup/rollup-linux-powerpc64le-gnu" "4.27.4" - "@rollup/rollup-linux-riscv64-gnu" "4.27.4" - "@rollup/rollup-linux-s390x-gnu" "4.27.4" - "@rollup/rollup-linux-x64-gnu" "4.27.4" - "@rollup/rollup-linux-x64-musl" "4.27.4" - "@rollup/rollup-win32-arm64-msvc" "4.27.4" - "@rollup/rollup-win32-ia32-msvc" "4.27.4" - "@rollup/rollup-win32-x64-msvc" "4.27.4" + "@rollup/rollup-android-arm-eabi" "4.28.1" + "@rollup/rollup-android-arm64" "4.28.1" + "@rollup/rollup-darwin-arm64" "4.28.1" + "@rollup/rollup-darwin-x64" "4.28.1" + "@rollup/rollup-freebsd-arm64" "4.28.1" + "@rollup/rollup-freebsd-x64" "4.28.1" + "@rollup/rollup-linux-arm-gnueabihf" "4.28.1" + "@rollup/rollup-linux-arm-musleabihf" "4.28.1" + "@rollup/rollup-linux-arm64-gnu" "4.28.1" + "@rollup/rollup-linux-arm64-musl" "4.28.1" + "@rollup/rollup-linux-loongarch64-gnu" "4.28.1" + "@rollup/rollup-linux-powerpc64le-gnu" "4.28.1" + "@rollup/rollup-linux-riscv64-gnu" "4.28.1" + "@rollup/rollup-linux-s390x-gnu" "4.28.1" + "@rollup/rollup-linux-x64-gnu" "4.28.1" + "@rollup/rollup-linux-x64-musl" "4.28.1" + "@rollup/rollup-win32-arm64-msvc" "4.28.1" + "@rollup/rollup-win32-ia32-msvc" "4.28.1" + "@rollup/rollup-win32-x64-msvc" "4.28.1" fsevents "~2.3.2" safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: @@ -10520,17 +9689,17 @@ safe-json-utils@^1.1.1: resolved "https://registry.yarnpkg.com/safe-json-utils/-/safe-json-utils-1.1.1.tgz#0e883874467d95ab914c3f511096b89bfb3e63b1" integrity sha512-SAJWGKDs50tAbiDXLf89PDwt9XYkWyANFWVzn4dTXl5QyI8t2o/bW5/OJl3lvc2WVU4MEpTo9Yz5NVFNsp+OJQ== -safe-regex2@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/safe-regex2/-/safe-regex2-4.0.0.tgz#5e04d8362cd4884753c8bce9715d4759a5239c0a" - integrity sha512-Hvjfv25jPDVr3U+4LDzBuZPPOymELG3PYcSk5hcevooo1yxxamQL/bHs/GrEPGmMoMEwRrHVGiCA1pXi97B8Ew== +safe-regex2@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/safe-regex2/-/safe-regex2-3.1.0.tgz#fd7ec23908e2c730e1ce7359a5b72883a87d2763" + integrity sha512-RAAZAGbap2kBfbVhvmnTFv73NWLMvDGOITFYTZBAaY8eR+Ir4ef7Up/e7amo+y1+AH+3PtLkrt9mvcTsG9LXug== dependencies: - ret "~0.5.0" + ret "~0.4.0" safe-stable-stringify@^2.1.0, safe-stable-stringify@^2.3.1: - version "2.4.3" - resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" - integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== + version "2.5.0" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: version "2.1.2" @@ -10566,10 +9735,10 @@ secure-json-parse@^2.7.0: resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== -semver@^7.1.2, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== +semver@^7.1.2, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== set-blocking@^2.0.0: version "2.0.0" @@ -10577,11 +9746,11 @@ set-blocking@^2.0.0: integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== set-cookie-parser@^2.4.1: - version "2.6.0" - resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz#131921e50f62ff1a66a461d7d62d7b21d5d15a51" - integrity sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ== + version "2.7.1" + resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz#3016f150072202dfbe90fadee053573cc89d2943" + integrity sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ== -set-function-length@^1.2.1: +set-function-length@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== @@ -10624,19 +9793,49 @@ shebang-regex@^3.0.0: integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== shell-quote@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" - integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + version "1.8.2" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.2.tgz#d2d83e057959d53ec261311e9e9b8f51dcb2934a" + integrity sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA== + +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" side-channel@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" - integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== dependencies: - call-bind "^1.0.7" es-errors "^1.3.0" - get-intrinsic "^1.2.4" - object-inspect "^1.13.1" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" siginfo@^2.0.0: version "2.0.0" @@ -10668,18 +9867,13 @@ sonic-boom@^2.2.1: atomic-sleep "^1.0.0" sonic-boom@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-4.0.1.tgz#515b7cef2c9290cb362c4536388ddeece07aed30" - integrity sha512-hTSD/6JMLyT4r9zeof6UtuBDpjJ9sO08/nmS5djaA9eozT9oOlNdpXSnzcgj4FTqpk3nkLrs61l4gip9r1HCrQ== + version "4.2.0" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-4.2.0.tgz#e59a525f831210fa4ef1896428338641ac1c124d" + integrity sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww== dependencies: atomic-sleep "^1.0.0" -source-map-js@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" - integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== - -source-map-js@^1.2.1: +source-map-js@^1.2.0, source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== @@ -10736,10 +9930,10 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -std-env@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" - integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== +std-env@^3.7.0, std-env@^3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.8.0.tgz#b56ffc1baf1a29dcc80a3bdf11d7fca7c315e7d5" + integrity sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w== stream-browserify@^2.0.1: version "2.0.2" @@ -10804,7 +9998,7 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@^1.3.0: +string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -10861,13 +10055,6 @@ strip-json-comments@^3.1.0: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-literal@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-2.1.0.tgz#6d82ade5e2e74f5c7e8739b6c84692bd65f0bd2a" - integrity sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw== - dependencies: - js-tokens "^9.0.0" - strnum@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" @@ -10884,9 +10071,9 @@ stylis@4.2.0: integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw== superjson@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/superjson/-/superjson-2.2.1.tgz#9377a7fa80fedb10c851c9dbffd942d4bcf79733" - integrity sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA== + version "2.2.2" + resolved "https://registry.yarnpkg.com/superjson/-/superjson-2.2.2.tgz#9d52bf0bf6b5751a3c3472f1292e714782ba3173" + integrity sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q== dependencies: copy-anything "^3.0.2" @@ -10895,13 +10082,6 @@ superstruct@^1.0.3: resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-1.0.4.tgz#0adb99a7578bd2f1c526220da6571b2d485d91ca" integrity sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ== -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -10968,10 +10148,10 @@ text-hex@1.0.x: resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== -thirdweb@5.26.0: - version "5.26.0" - resolved "https://registry.yarnpkg.com/thirdweb/-/thirdweb-5.26.0.tgz#00651fadb431e3423ffc3151b1ce079e0ca3cc1d" - integrity sha512-RjHJ7ccJkUOwa77N0BtINO+cMn0SWa67xB3a68xI8YtKse08rjgv5+rxjXvNnrTJm/owkGUmYe41DCDne/5bmQ== +thirdweb@5.29.6: + version "5.29.6" + resolved "https://registry.yarnpkg.com/thirdweb/-/thirdweb-5.29.6.tgz#3f801de1d8cdf43423f24cf65168bf84a3e0d214" + integrity sha512-OR/YjArZE2gc72kwJENbbWqxT6AY/X7phdyuu9GgG2O56/vbr4rytKdPesGUeYZ3dY5moUgZZgff+FmQhW0OCA== dependencies: "@coinbase/wallet-sdk" "4.0.3" "@emotion/react" "11.11.4" @@ -10986,6 +10166,7 @@ thirdweb@5.26.0: "@radix-ui/react-tooltip" "1.0.7" "@tanstack/react-query" "5.29.2" "@walletconnect/ethereum-provider" "2.12.2" + "@walletconnect/sign-client" "^2.13.1" abitype "1.0.0" fast-text-encoding "^1.0.6" fuse.js "7.0.0" @@ -10993,34 +10174,34 @@ thirdweb@5.26.0: mipd "0.0.7" node-libs-browser "2.2.1" uqr "0.1.2" - viem "2.10.9" + viem "2.13.7" thirdweb@^5.71.0: - version "5.71.0" - resolved "https://registry.yarnpkg.com/thirdweb/-/thirdweb-5.71.0.tgz#502bc76160eb03e40d09526e50e32a15ae6e0f9e" - integrity sha512-Cehpihu5727LeTTRypXwzo6Y8N4Y7S2KUlrXWExR2svLxICfCt/YfJ69f+otoEk9zb1u6WHvOvQBw5mMk15e3A== + version "5.77.0" + resolved "https://registry.yarnpkg.com/thirdweb/-/thirdweb-5.77.0.tgz#4a2e48ded8e07c6ded0256c1440cf5b7ad740cec" + integrity sha512-ugrrZSjy8WnY4tQ/OdFn9eXFp/XAfz8lvVF7zUcaY/WRY/x3k69n31oA87FrKsiBIcJuib2lc2sHjjstg8qUcQ== dependencies: - "@coinbase/wallet-sdk" "4.2.3" - "@emotion/react" "11.13.3" - "@emotion/styled" "11.13.0" + "@coinbase/wallet-sdk" "4.2.4" + "@emotion/react" "11.14.0" + "@emotion/styled" "11.14.0" "@google/model-viewer" "2.1.1" - "@noble/curves" "1.6.0" - "@noble/hashes" "1.5.0" + "@noble/curves" "1.7.0" + "@noble/hashes" "1.6.1" "@passwordless-id/webauthn" "^2.1.2" "@radix-ui/react-dialog" "1.1.2" "@radix-ui/react-focus-scope" "1.1.0" "@radix-ui/react-icons" "1.3.2" "@radix-ui/react-tooltip" "1.1.4" - "@tanstack/react-query" "5.60.2" + "@tanstack/react-query" "5.62.7" "@walletconnect/ethereum-provider" "2.17.2" "@walletconnect/sign-client" "2.17.2" - abitype "1.0.6" + abitype "1.0.7" fuse.js "7.0.0" input-otp "^1.4.1" mipd "0.0.7" - ox "0.2.1" + ox "0.4.1" uqr "0.1.2" - viem "2.21.45" + viem "2.21.54" thread-stream@^0.15.1: version "0.15.2" @@ -11030,9 +10211,9 @@ thread-stream@^0.15.1: real-require "^0.1.0" thread-stream@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-3.0.2.tgz#ff6c557ed0cdd1f6c82b802481fbc22e11b8a006" - integrity sha512-cBL4xF2A3lSINV4rD5tyqnKH4z/TgWPvT+NaVhJDSwK962oo/Ye7cHSMbDzwcu7tAE1SfU6Q4XtV6Hucmi6Hlw== + version "3.1.0" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-3.1.0.tgz#4b2ef252a7c215064507d4ef70c05a5e2d34c4f1" + integrity sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A== dependencies: real-require "^0.2.0" @@ -11058,25 +10239,30 @@ tiny-invariant@^1.3.3: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== -tinybench@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.8.0.tgz#30e19ae3a27508ee18273ffed9ac7018949acd7b" - integrity sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw== +tinybench@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.9.0.tgz#103c9f8ba6d7237a47ab6dd1dcff77251863426b" + integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== -tinypool@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-1.0.0.tgz#a68965218e04f4ad9de037d2a1cd63cda9afb238" - integrity sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ== +tinyexec@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.1.tgz#0ab0daf93b43e2c211212396bdb836b468c97c98" + integrity sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ== + +tinypool@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-1.0.2.tgz#706193cc532f4c100f66aa00b01c42173d9051b2" + integrity sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA== tinyrainbow@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/tinyrainbow/-/tinyrainbow-1.2.0.tgz#5c57d2fc0fb3d1afd78465c33ca885d04f02abb5" integrity sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ== -tinyspy@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-3.0.0.tgz#cb61644f2713cd84dee184863f4642e06ddf0585" - integrity sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA== +tinyspy@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-3.0.2.tgz#86dd3cf3d737b15adcf17d7887c84a75201df20a" + integrity sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q== tlhunter-sorted-set@^0.1.0: version "0.1.0" @@ -11093,11 +10279,6 @@ to-arraybuffer@^1.0.0: resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" integrity sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA== -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -11135,20 +10316,10 @@ tslib@1.14.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" - integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== - -tslib@^2.4.0, tslib@^2.6.1: - version "2.7.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" - integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== - -tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== +tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.6.2, tslib@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== tty-browserify@0.0.0: version "0.0.0" @@ -11172,10 +10343,10 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@^4.0.0, type-detect@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-detect@^4.0.0, type-detect@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== type-is@~1.6.18: version "1.6.18" @@ -11198,24 +10369,24 @@ typedarray-to-buffer@^3.1.5: is-typedarray "^1.0.0" typescript@^5.1.3: - version "5.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" - integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + version "5.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== uc.micro@^2.0.0, uc.micro@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== -ufo@^1.4.0, ufo@^1.5.3: +ufo@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== uglify-js@^3.1.4, uglify-js@^3.7.7: - version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== + version "3.19.3" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" + integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ== uint8arrays@3.1.0: version "3.1.0" @@ -11244,16 +10415,21 @@ uncrypto@^0.1.3: integrity sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q== underscore@~1.13.2: - version "1.13.6" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" - integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== + version "1.13.7" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" + integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -unenv@^1.9.0: +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + +unenv@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.10.0.tgz#c3394a6c6e4cfe68d699f87af456fe3f0db39571" integrity sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ== @@ -11285,20 +10461,20 @@ unpipe@1.0.0: integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== unstorage@^1.9.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.10.2.tgz#fb7590ada8b30e83be9318f85100158b02a76dae" - integrity sha512-cULBcwDqrS8UhlIysUJs2Dk0Mmt8h7B0E6mtR+relW9nZvsf/u4SkAYyNliPiPW7XtFNb5u3IUMkxGxFTTRTgQ== + version "1.13.1" + resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.13.1.tgz#090b30de978ee8755b3ad7bbc00acfade124ac13" + integrity sha512-ELexQHUrG05QVIM/iUeQNdl9FXDZhqLJ4yP59fnmn2jGUh0TEulwOgov1ubOb3Gt2ZGK/VMchJwPDNVEGWQpRg== dependencies: anymatch "^3.1.3" chokidar "^3.6.0" + citty "^0.1.6" destr "^2.0.3" - h3 "^1.11.1" - listhen "^1.7.2" - lru-cache "^10.2.0" - mri "^1.2.0" - node-fetch-native "^1.6.2" - ofetch "^1.3.3" - ufo "^1.4.0" + h3 "^1.13.0" + listhen "^1.9.0" + lru-cache "^10.4.3" + node-fetch-native "^1.6.4" + ofetch "^1.4.1" + ufo "^1.5.4" untun@^0.1.3: version "0.1.3" @@ -11314,7 +10490,7 @@ uqr@0.1.2, uqr@^0.1.2: resolved "https://registry.yarnpkg.com/uqr/-/uqr-0.1.2.tgz#5c6cd5dcff9581f9bb35b982cb89e2c483a41d7d" integrity sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA== -uri-js@^4.2.2, uri-js@^4.4.1: +uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== @@ -11432,10 +10608,10 @@ varint@^6.0.0: resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== -viem@2.10.9: - version "2.10.9" - resolved "https://registry.yarnpkg.com/viem/-/viem-2.10.9.tgz#2ccd69cb073b547507ea86c42c122daa3128af55" - integrity sha512-XsbEXhOcmQOkI80zDLW0EdksimNuYTS61HZ03vQYpHoug7gwVHDQ83nY+nuyT7punuFx0fmRG6+HZg3yVQhptQ== +viem@2.13.7: + version "2.13.7" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.13.7.tgz#c1153c02f7ffaf0263d784fc1d4e4ffa3f66c24a" + integrity sha512-SZWn9LPrz40PHl4PM2iwkPTTtjWPDFsnLr32UwpqC/Z5f0AwxitjLyZdDKcImvbWZ3vLQ0oPggR1aLlqvTcUug== dependencies: "@adraffy/ens-normalize" "1.10.0" "@noble/curves" "1.2.0" @@ -11446,30 +10622,30 @@ viem@2.10.9: isows "1.0.4" ws "8.13.0" -viem@2.21.45: - version "2.21.45" - resolved "https://registry.yarnpkg.com/viem/-/viem-2.21.45.tgz#7a445428d4909cc334f231ee916ede1b69190603" - integrity sha512-I+On/IiaObQdhDKWU5Rurh6nf3G7reVkAODG5ECIfjsrGQ3EPJnxirUPT4FNV6bWER5iphoG62/TidwuTSOA1A== +viem@2.21.54, viem@^2.21.54: + version "2.21.54" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.21.54.tgz#76d6f86ab8809078f1ac140ac1a2beadbc86b9f6" + integrity sha512-G9mmtbua3UtnVY9BqAtWdNp+3AO+oWhD0B9KaEsZb6gcrOWgmA4rz02yqEMg+qW9m6KgKGie7q3zcHqJIw6AqA== dependencies: - "@noble/curves" "1.6.0" - "@noble/hashes" "1.5.0" - "@scure/bip32" "1.5.0" - "@scure/bip39" "1.4.0" - abitype "1.0.6" + "@noble/curves" "1.7.0" + "@noble/hashes" "1.6.1" + "@scure/bip32" "1.6.0" + "@scure/bip39" "1.5.0" + abitype "1.0.7" isows "1.0.6" ox "0.1.2" webauthn-p256 "0.0.10" ws "8.18.0" -vite-node@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-2.0.3.tgz#449b1524178304ba764bd33062bd31a09c5e673f" - integrity sha512-14jzwMx7XTcMB+9BhGQyoEAmSl0eOr3nrnn+Z12WNERtOvLN+d2scbRUvyni05rT3997Bg+rZb47NyP4IQPKXg== +vite-node@2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-2.1.8.tgz#9495ca17652f6f7f95ca7c4b568a235e0c8dbac5" + integrity sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg== dependencies: cac "^6.7.14" - debug "^4.3.5" + debug "^4.3.7" + es-module-lexer "^1.5.4" pathe "^1.1.2" - tinyrainbow "^1.2.0" vite "^5.0.0" vite@^5.0.0: @@ -11484,29 +10660,30 @@ vite@^5.0.0: fsevents "~2.3.3" vitest@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-2.0.3.tgz#daf7e43c9415c6825922ae3a63cac452d1ac705f" - integrity sha512-o3HRvU93q6qZK4rI2JrhKyZMMuxg/JRt30E6qeQs6ueaiz5hr1cPj+Sk2kATgQzMMqsa2DiNI0TIK++1ULx8Jw== - dependencies: - "@ampproject/remapping" "^2.3.0" - "@vitest/expect" "2.0.3" - "@vitest/pretty-format" "^2.0.3" - "@vitest/runner" "2.0.3" - "@vitest/snapshot" "2.0.3" - "@vitest/spy" "2.0.3" - "@vitest/utils" "2.0.3" - chai "^5.1.1" - debug "^4.3.5" - execa "^8.0.1" - magic-string "^0.30.10" + version "2.1.8" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-2.1.8.tgz#2e6a00bc24833574d535c96d6602fb64163092fa" + integrity sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ== + dependencies: + "@vitest/expect" "2.1.8" + "@vitest/mocker" "2.1.8" + "@vitest/pretty-format" "^2.1.8" + "@vitest/runner" "2.1.8" + "@vitest/snapshot" "2.1.8" + "@vitest/spy" "2.1.8" + "@vitest/utils" "2.1.8" + chai "^5.1.2" + debug "^4.3.7" + expect-type "^1.1.0" + magic-string "^0.30.12" pathe "^1.1.2" - std-env "^3.7.0" - tinybench "^2.8.0" - tinypool "^1.0.0" + std-env "^3.8.0" + tinybench "^2.9.0" + tinyexec "^0.3.1" + tinypool "^1.0.1" tinyrainbow "^1.2.0" vite "^5.0.0" - vite-node "2.0.3" - why-is-node-running "^2.2.2" + vite-node "2.1.8" + why-is-node-running "^2.3.0" vm-browserify@^1.0.1: version "1.1.2" @@ -11630,12 +10807,12 @@ web3-core@^1.8.1: web3-core-requestmanager "1.10.4" web3-utils "1.10.4" -web3-errors@^1.2.0, web3-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/web3-errors/-/web3-errors-1.3.0.tgz#504e4d3218899df108856940087a8022d6688d74" - integrity sha512-j5JkAKCtuVMbY3F5PYXBqg1vWrtF4jcyyMY1rlw8a4PV67AkqlepjGgpzWJZd56Mt+TvHy6DA1F/3Id8LatDSQ== +web3-errors@^1.2.0, web3-errors@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/web3-errors/-/web3-errors-1.3.1.tgz#163bc4d869f98614760b683d733c3ed1fb415d98" + integrity sha512-w3NMJujH+ZSW4ltIZZKtdbkbyQEvBzyp3JRn59Ckli0Nz4VMsVq8aF1bLWM7A2kuQ+yVEm3ySeNU+7mSRwx7RQ== dependencies: - web3-types "^1.7.0" + web3-types "^1.10.0" web3-eth-iban@1.10.4: version "1.10.4" @@ -11705,20 +10882,20 @@ web3-providers-ws@1.5.2: web3-core-helpers "1.5.2" websocket "^1.0.32" -web3-types@^1.6.0, web3-types@^1.7.0, web3-types@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/web3-types/-/web3-types-1.8.1.tgz#6379aca0f99330eb0f8f6ca80a3de93129b58339" - integrity sha512-isspsvQbBJFUkJYz2Badb7dz/BrLLLpOop/WmnL5InyYMr7kYYc8038NYO7Vkp1M7Bupa/wg+yALvBm7EGbyoQ== +web3-types@^1.10.0, web3-types@^1.6.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/web3-types/-/web3-types-1.10.0.tgz#41b0b4d2dd75e919d5b6f37bf139e29f445db04e" + integrity sha512-0IXoaAFtFc8Yin7cCdQfB9ZmjafrbP6BO0f0KT/khMhXKUpoJ6yShrVhiNpyRBo8QQjuOagsWzwSK2H49I7sbw== web3-utils@1.10.4, web3-utils@1.5.2, web3-utils@>=4.2.1, web3-utils@^1.3.4, web3-utils@^1.8.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-4.3.2.tgz#a952428d677b635fd0c16044ae4c534807a39639" - integrity sha512-bEFpYEBMf6ER78Uvj2mdsCbaLGLK9kABOsa3TtXOEEhuaMy/RK0KlRkKoZ2vmf/p3hB8e1q5erknZ6Hy7AVp7A== + version "4.3.3" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-4.3.3.tgz#e380a1c03a050d3704f94bd08c1c9f50a1487205" + integrity sha512-kZUeCwaQm+RNc2Bf1V3BYbF29lQQKz28L0y+FA4G0lS8IxtJVGi5SeDTUkpwqqkdHHC7JcapPDnyyzJ1lfWlOw== dependencies: ethereum-cryptography "^2.0.0" eventemitter3 "^5.0.1" - web3-errors "^1.3.0" - web3-types "^1.8.1" + web3-errors "^1.3.1" + web3-types "^1.10.0" web3-validator "^2.0.6" web3-validator@^2.0.6: @@ -11771,9 +10948,9 @@ which-module@^2.0.0: integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== which-typed-array@^1.1.14, which-typed-array@^1.1.2: - version "1.1.15" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" - integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + version "1.1.16" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.16.tgz#db4db429c4706feca2f01677a144278e4a8c216b" + integrity sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ== dependencies: available-typed-arrays "^1.0.7" call-bind "^1.0.7" @@ -11788,7 +10965,7 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -why-is-node-running@^2.2.2: +why-is-node-running@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz#a3f69a97107f494b3cdc3bdddd883a7d65cebf04" integrity sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w== @@ -11796,31 +10973,31 @@ why-is-node-running@^2.2.2: siginfo "^2.0.0" stackback "0.0.2" -winston-transport@^4.7.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.7.1.tgz#52ff1bcfe452ad89991a0aaff9c3b18e7f392569" - integrity sha512-wQCXXVgfv/wUPOfb2x0ruxzwkcZfxcktz6JIMUaPLmcNhO4bZTwA/WtDWK74xV3F2dKu8YadrFv0qhwYjVEwhA== +winston-transport@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.9.0.tgz#3bba345de10297654ea6f33519424560003b3bf9" + integrity sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A== dependencies: - logform "^2.6.1" + logform "^2.7.0" readable-stream "^3.6.2" triple-beam "^1.3.0" winston@^3.14.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/winston/-/winston-3.14.1.tgz#b296f2756e6b46d3b6faac5660d2af878fc3f666" - integrity sha512-CJi4Il/msz8HkdDfXOMu+r5Au/oyEjFiOZzbX2d23hRLY0narGjqfE5lFlrT5hfYJhPtM8b85/GNFsxIML/RVA== + version "3.17.0" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.17.0.tgz#74b8665ce9b4ea7b29d0922cfccf852a08a11423" + integrity sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw== dependencies: "@colors/colors" "^1.6.0" "@dabh/diagnostics" "^2.0.2" async "^3.2.3" is-stream "^2.0.0" - logform "^2.6.0" + logform "^2.7.0" one-time "^1.0.0" readable-stream "^3.4.0" safe-stable-stringify "^2.3.1" stack-trace "0.0.x" triple-beam "^1.3.0" - winston-transport "^4.7.0" + winston-transport "^4.9.0" word-wrap@~1.2.3: version "1.2.5" @@ -11938,15 +11115,10 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yaml@^2.2.2: - version "2.5.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.1.tgz#c9772aacf62cb7494a95b0c4f1fb065b563db130" - integrity sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q== - -yaml@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.2.tgz#7a2b30f2243a5fc299e1f14ca58d475ed4bc5362" - integrity sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA== +yaml@^2.2.2, yaml@^2.4.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.6.1.tgz#42f2b1ba89203f374609572d5349fb8686500773" + integrity sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg== yargs-parser@^18.1.2: version "18.1.3" @@ -12025,16 +11197,16 @@ zksync-web3@^0.14.3: integrity sha512-kYehMD/S6Uhe1g434UnaMN+sBr9nQm23Ywn0EUP5BfQCsbjcr3ORuS68PosZw8xUTu3pac7G6YMSnNHk+fwzvg== zod-to-json-schema@^3.23.0: - version "3.23.0" - resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.0.tgz#4fc60e88d3c709eedbfaae3f92f8a7bf786469f2" - integrity sha512-az0uJ243PxsRIa2x1WmNE/pnuA05gUq/JB8Lwe1EDCCL/Fz9MgjYQ0fPlyc2Tcv6aF2ZA7WM5TWaRZVEFaAIag== + version "3.24.1" + resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.24.1.tgz#f08c6725091aadabffa820ba8d50c7ab527f227a" + integrity sha512-3h08nf3Vw3Wl3PK+q3ow/lIil81IT2Oa7YpQyUUDsEWbXveMesdfK1xBd2RhCkynwZndAxixji/7SYJJowr62w== -zod@3.22.4: - version "3.22.4" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff" - integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg== - -zod@^3.21.4, zod@^3.22.4, zod@^3.23.8: +zod@3.23.8: version "3.23.8" resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== + +zod@^3.21.4, zod@^3.22.4, zod@^3.23.8: + version "3.24.1" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.24.1.tgz#27445c912738c8ad1e9de1bea0359fa44d9d35ee" + integrity sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==