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/.gitignore b/.gitignore index dbb062fa7..22f202da8 100644 --- a/.gitignore +++ b/.gitignore @@ -152,3 +152,6 @@ https # Auto generated OpenAPI file openapi.json .aider* + +# jetbrains +.idea diff --git a/package.json b/package.json index 6d156ac43..30122c84b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,12 @@ "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'", + "biome:format": "yarn biome format", + "biome:format:fix": "yarn biome format --write", + "biome:lint": "yarn biome lint", + "biome:lint:fix": "yarn biome lint --write", + "biome:check": "yarn biome check", + "biome:check:fix": "yarn biome check --write", "test:unit": "vitest", "test:coverage": "vitest run --coverage", "copy-files": "cp -r ./src/prisma ./dist/" @@ -84,11 +89,7 @@ "@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", "typescript": "^5.1.3", @@ -113,5 +114,6 @@ "micromatch": ">=4.0.8", "secp256k1": ">=4.0.4", "ws": ">=8.17.1" - } + }, + "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" } diff --git a/src/db/client.ts b/src/db/client.ts index bddb0eafe..458742b5b 100644 --- a/src/db/client.ts +++ b/src/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 "../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 (error) { + } catch { return false; } }; diff --git a/src/db/contractEventLogs/createContractEventLogs.ts b/src/db/contractEventLogs/createContractEventLogs.ts index cb498e9c1..9442f5a27 100644 --- a/src/db/contractEventLogs/createContractEventLogs.ts +++ b/src/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 "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts b/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts index 1cd733b4c..db011f815 100644 --- a/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts +++ b/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts @@ -1,5 +1,5 @@ -import { ContractTransactionReceipts, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schema/prisma"; +import type { ContractTransactionReceipts, Prisma } from "@prisma/client"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/db/keypair/delete.ts b/src/db/keypair/delete.ts index 08fd6529c..f731594fb 100644 --- a/src/db/keypair/delete.ts +++ b/src/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/db/keypair/get.ts b/src/db/keypair/get.ts index 37e1cf00d..3e095a696 100644 --- a/src/db/keypair/get.ts +++ b/src/db/keypair/get.ts @@ -1,5 +1,5 @@ -import { Keypairs } from "@prisma/client"; import { createHash } from "crypto"; +import type { Keypairs } from "@prisma/client"; import { prisma } from "../client"; export const getKeypairByHash = async ( diff --git a/src/db/keypair/insert.ts b/src/db/keypair/insert.ts index c6d7b737d..17b7dd9b3 100644 --- a/src/db/keypair/insert.ts +++ b/src/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 type { KeypairAlgorithm } from "../../server/schemas/keypairs"; import { prisma } from "../client"; export const insertKeypair = async ({ diff --git a/src/db/keypair/list.ts b/src/db/keypair/list.ts index cc08bbda8..0bf1dc494 100644 --- a/src/db/keypair/list.ts +++ b/src/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/db/relayer/getRelayerById.ts b/src/db/relayer/getRelayerById.ts index 315132b5a..9216e5c5f 100644 --- a/src/db/relayer/getRelayerById.ts +++ b/src/db/relayer/getRelayerById.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/db/transactions/queueTx.ts b/src/db/transactions/queueTx.ts index 76baa3656..31b4c5bff 100644 --- a/src/db/transactions/queueTx.ts +++ b/src/db/transactions/queueTx.ts @@ -1,6 +1,6 @@ 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 Address, ZERO_ADDRESS } from "thirdweb"; import type { ContractExtension } from "../../schema/extension"; import { parseTransactionOverrides } from "../../server/utils/transactionOverrides"; import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; diff --git a/src/db/wallets/deleteWalletDetails.ts b/src/db/wallets/deleteWalletDetails.ts index 69e5fd3da..96aeb3860 100644 --- a/src/db/wallets/deleteWalletDetails.ts +++ b/src/db/wallets/deleteWalletDetails.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/db/wallets/getAllWallets.ts b/src/db/wallets/getAllWallets.ts index fd8ef80a0..d6e4dbc7a 100644 --- a/src/db/wallets/getAllWallets.ts +++ b/src/db/wallets/getAllWallets.ts @@ -1,4 +1,4 @@ -import { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetAllWalletsParams { diff --git a/src/db/wallets/nonceMap.ts b/src/db/wallets/nonceMap.ts index 868b00dcc..a8592e0e4 100644 --- a/src/db/wallets/nonceMap.ts +++ b/src/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"; @@ -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/db/wallets/walletNonce.ts b/src/db/wallets/walletNonce.ts index 041b7d58b..f44d02492 100644 --- a/src/db/wallets/walletNonce.ts +++ b/src/db/wallets/walletNonce.ts @@ -1,8 +1,8 @@ import { + type Address, eth_getTransactionCount, getAddress, getRpcClient, - type Address, } from "thirdweb"; import { getChain } from "../../utils/chain"; import { logger } from "../../utils/logger"; diff --git a/src/db/webhooks/createWebhook.ts b/src/db/webhooks/createWebhook.ts index 8e8bb66d7..981ca2784 100644 --- a/src/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 "../../schema/webhooks"; +import type { Webhooks } from "@prisma/client"; +import type { WebhooksEventTypes } from "../../schema/webhooks"; import { prisma } from "../client"; interface CreateWebhooksParams { diff --git a/src/db/webhooks/getAllWebhooks.ts b/src/db/webhooks/getAllWebhooks.ts index 85e93eefc..1f76e76c8 100644 --- a/src/db/webhooks/getAllWebhooks.ts +++ b/src/db/webhooks/getAllWebhooks.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/lib/chain/chain-capabilities.ts b/src/lib/chain/chain-capabilities.ts index 7a584f5c5..574e75958 100644 --- a/src/lib/chain/chain-capabilities.ts +++ b/src/lib/chain/chain-capabilities.ts @@ -1,5 +1,6 @@ import { createSWRCache } from "../cache/swr"; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const Services = [ "contracts", "connect-sdk", diff --git a/src/schema/prisma.ts b/src/schema/prisma.ts index abe01be4c..03c088379 100644 --- a/src/schema/prisma.ts +++ b/src/schema/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/scripts/generate-sdk.ts b/src/scripts/generate-sdk.ts index f39c377f8..17f6e75c0 100644 --- a/src/scripts/generate-sdk.ts +++ b/src/scripts/generate-sdk.ts @@ -51,7 +51,7 @@ function applyOperationIdMappings( let newCode: string = originalCode; for (const [newId, oldId] of Object.entries(mappings)) { - const regex: RegExp = new RegExp(`public\\s+${newId}\\(`, "g"); + const regex = new RegExp(`public\\s+${newId}\\(`, "g"); const methods = newCode.match(regex); if (methods) { @@ -79,7 +79,7 @@ function processErcServices( const replacementLog: string[] = []; let newCode: string = originalCode; - const regex: RegExp = new RegExp(`public\\s+${tag}(\\w+)\\(`, "g"); + const regex = new RegExp(`public\\s+${tag}(\\w+)\\(`, "g"); const methods = newCode.match(regex); if (methods) { @@ -127,7 +127,7 @@ async function main(): Promise { .readFileSync("./sdk/src/Engine.ts", "utf-8") .replace("export class Engine", "class EngineLogic"); - const newEngineCode: string = `${engineCode} + const newEngineCode = `${engineCode} export class Engine extends EngineLogic { constructor(config: { url: string; accessToken: string; }) { super({ BASE: config.url, TOKEN: config.accessToken }); @@ -136,7 +136,7 @@ export class Engine extends EngineLogic { `; fs.writeFileSync("./sdk/src/Engine.ts", newEngineCode); - const servicesDir: string = "./sdk/src/services"; + const servicesDir = "./sdk/src/services"; const serviceFiles: string[] = fs.readdirSync(servicesDir); const ercServices: string[] = ["erc20", "erc721", "erc1155"]; @@ -176,4 +176,4 @@ export class Engine extends EngineLogic { } } -main(); +main().then(); diff --git a/src/server/index.ts b/src/server/index.ts index 66d7f2e10..3e9b32f58 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -1,8 +1,8 @@ -import type { TypeBoxTypeProvider } from "@fastify/type-provider-typebox"; -import fastify, { type FastifyInstance } from "fastify"; import * as fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; +import type { TypeBoxTypeProvider } from "@fastify/type-provider-typebox"; +import fastify, { type FastifyInstance } from "fastify"; import { clearCacheCron } from "../utils/cron/clearCacheCron"; import { env } from "../utils/env"; import { logger } from "../utils/logger"; diff --git a/src/server/listeners/updateTxListener.ts b/src/server/listeners/updateTxListener.ts index d8ff01ebf..94d5ff559 100644 --- a/src/server/listeners/updateTxListener.ts +++ b/src/server/listeners/updateTxListener.ts @@ -28,7 +28,7 @@ export const updateTxListener = async (): Promise => { (sub) => sub.requestId === parsedPayload.id, ); - if (index == -1) { + if (index === -1) { return; } @@ -47,7 +47,9 @@ export const updateTxListener = async (): Promise => { userSubscription.socket.send( await formatSocketMessage(returnData, message), ); - closeConnection ? userSubscription.socket.close() : null; + if (closeConnection) { + userSubscription.socket.close(); + } }, ); diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/adminRoutes.ts index 76719a137..60921114c 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/adminRoutes.ts @@ -1,9 +1,9 @@ +import { timingSafeEqual } from "crypto"; 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 { env } from "../../utils/env"; @@ -85,7 +85,9 @@ const assertAdminBasicAuth = (username: string, password: string) => { const buf1 = Buffer.from(password.padEnd(100)); const buf2 = Buffer.from(ADMIN_ROUTES_PASSWORD.padEnd(100)); return timingSafeEqual(buf1, buf2); - } catch (e) {} + } catch { + /* empty */ + } } return false; }; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 539d36b12..5b0f3841e 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -1,11 +1,11 @@ +import { createHash } from "crypto"; import { parseJWT } from "@thirdweb-dev/auth"; import { ThirdwebAuth, - getToken as getJWT, type ThirdwebAuthUser, + getToken as getJWT, } from "@thirdweb-dev/auth/fastify"; import { AsyncWallet } from "@thirdweb-dev/wallets/evm/wallets/async"; -import { createHash } from "crypto"; import type { FastifyInstance } from "fastify"; import type { FastifyRequest } from "fastify/types/request"; import jsonwebtoken, { type JwtPayload } from "jsonwebtoken"; @@ -383,7 +383,7 @@ const handleAccessToken = async ( try { token = await getAccessToken({ jwt }); - } catch (e) { + } catch { // 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/cors/cors.ts b/src/server/middleware/cors/cors.ts index e56238642..2ae1528e2 100644 --- a/src/server/middleware/cors/cors.ts +++ b/src/server/middleware/cors/cors.ts @@ -1,4 +1,4 @@ -import { +import type { FastifyInstance, FastifyReply, FastifyRequest, @@ -16,7 +16,7 @@ declare module "fastify" { } } -interface ArrayOfValueOrArray extends Array> {} +type ArrayOfValueOrArray = Array>; type OriginCallback = ( err: Error | null, @@ -155,6 +155,7 @@ export const fastifyCors = async ( let hideOptionsRoute = true; if (opts.hideOptionsRoute !== undefined) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars hideOptionsRoute = opts.hideOptionsRoute; } const corsOptions = normalizeCorsOptions(opts); diff --git a/src/server/middleware/cors/index.ts b/src/server/middleware/cors/index.ts index e964945d9..140828825 100644 --- a/src/server/middleware/cors/index.ts +++ b/src/server/middleware/cors/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { fastifyCors } from "./cors"; export const withCors = async (server: FastifyInstance) => { diff --git a/src/server/middleware/cors/vary.ts b/src/server/middleware/cors/vary.ts index 2a4423138..3ba118daf 100644 --- a/src/server/middleware/cors/vary.ts +++ b/src/server/middleware/cors/vary.ts @@ -70,7 +70,7 @@ function createAddFieldnameToVary(fieldname: string) { validateFieldname(fieldname); - return function (reply: FastifyReply) { + return (reply: FastifyReply) => { let header = reply.getHeader("Vary") as any; if (!header) { diff --git a/src/server/middleware/engineMode.ts b/src/server/middleware/engineMode.ts index 790cd1526..1fd68f1d4 100644 --- a/src/server/middleware/engineMode.ts +++ b/src/server/middleware/engineMode.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { env } from "../../utils/env"; export const withEnforceEngineMode = async (server: FastifyInstance) => { diff --git a/src/server/middleware/prometheus.ts b/src/server/middleware/prometheus.ts index 2b0faaf24..2a3d2fb74 100644 --- a/src/server/middleware/prometheus.ts +++ b/src/server/middleware/prometheus.ts @@ -1,4 +1,4 @@ -import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; +import type { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; import { env } from "../../utils/env"; import { recordMetrics } from "../../utils/prometheus"; diff --git a/src/server/middleware/rateLimit.ts b/src/server/middleware/rateLimit.ts index 5d87c9a11..179f1a751 100644 --- a/src/server/middleware/rateLimit.ts +++ b/src/server/middleware/rateLimit.ts @@ -8,7 +8,7 @@ import { OPENAPI_ROUTES } from "./open-api"; const SKIP_RATELIMIT_PATHS = ["/", ...OPENAPI_ROUTES]; export const withRateLimit = async (server: FastifyInstance) => { - server.addHook("onRequest", async (request, reply) => { + server.addHook("onRequest", async (request, _reply) => { if (SKIP_RATELIMIT_PATHS.includes(request.url)) { return; } diff --git a/src/server/middleware/websocket.ts b/src/server/middleware/websocket.ts index 2f68cf2f2..89a6aca6c 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) => { await server.register(WebSocketPlugin, { - errorHandler: function ( + errorHandler: ( error, conn /* SocketStream */, - req /* FastifyRequest */, - reply /* FastifyReply */, - ) { + _req /* FastifyRequest */, + _reply /* FastifyReply */, + ) => { logger({ service: "websocket", level: "error", diff --git a/src/server/routes/admin/nonces.ts b/src/server/routes/admin/nonces.ts index 2a2f528d3..9b8da1d05 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, @@ -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/admin/transaction.ts b/src/server/routes/admin/transaction.ts index 5827e5d24..d28524e46 100644 --- a/src/server/routes/admin/transaction.ts +++ b/src/server/routes/admin/transaction.ts @@ -1,6 +1,6 @@ -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"; diff --git a/src/server/routes/auth/access-tokens/create.ts b/src/server/routes/auth/access-tokens/create.ts index 9c33113cd..61c480cc3 100644 --- a/src/server/routes/auth/access-tokens/create.ts +++ b/src/server/routes/auth/access-tokens/create.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { buildJWT } from "@thirdweb-dev/auth"; import { LocalWallet } from "@thirdweb-dev/wallets"; import type { FastifyInstance } from "fastify"; diff --git a/src/server/routes/auth/access-tokens/getAll.ts b/src/server/routes/auth/access-tokens/getAll.ts index 181f35ec8..220faa072 100644 --- a/src/server/routes/auth/access-tokens/getAll.ts +++ b/src/server/routes/auth/access-tokens/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAccessTokens } from "../../../../db/tokens/getAccessTokens"; diff --git a/src/server/routes/auth/access-tokens/revoke.ts b/src/server/routes/auth/access-tokens/revoke.ts index 2d509bb65..f856a8467 100644 --- a/src/server/routes/auth/access-tokens/revoke.ts +++ b/src/server/routes/auth/access-tokens/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { revokeToken } from "../../../../db/tokens/revokeToken"; diff --git a/src/server/routes/auth/access-tokens/update.ts b/src/server/routes/auth/access-tokens/update.ts index a5d730fdb..4f040c088 100644 --- a/src/server/routes/auth/access-tokens/update.ts +++ b/src/server/routes/auth/access-tokens/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateToken } from "../../../../db/tokens/updateToken"; diff --git a/src/server/routes/auth/keypair/add.ts b/src/server/routes/auth/keypair/add.ts index 3ecc24364..adf5f83f5 100644 --- a/src/server/routes/auth/keypair/add.ts +++ b/src/server/routes/auth/keypair/add.ts @@ -1,6 +1,6 @@ -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"; diff --git a/src/server/routes/auth/keypair/list.ts b/src/server/routes/auth/keypair/list.ts index 8c4395f0e..c3e8ec820 100644 --- a/src/server/routes/auth/keypair/list.ts +++ b/src/server/routes/auth/keypair/list.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/auth/keypair/remove.ts b/src/server/routes/auth/keypair/remove.ts index 939979d52..95a878dc0 100644 --- a/src/server/routes/auth/keypair/remove.ts +++ b/src/server/routes/auth/keypair/remove.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/auth/permissions/getAll.ts b/src/server/routes/auth/permissions/getAll.ts index 7a4f5d4a4..3eececd8f 100644 --- a/src/server/routes/auth/permissions/getAll.ts +++ b/src/server/routes/auth/permissions/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../../db/client"; diff --git a/src/server/routes/auth/permissions/grant.ts b/src/server/routes/auth/permissions/grant.ts index 6f9ef49ee..a894212cb 100644 --- a/src/server/routes/auth/permissions/grant.ts +++ b/src/server/routes/auth/permissions/grant.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updatePermissions } from "../../../../db/permissions/updatePermissions"; diff --git a/src/server/routes/auth/permissions/revoke.ts b/src/server/routes/auth/permissions/revoke.ts index 08f1609bb..0e0745e6b 100644 --- a/src/server/routes/auth/permissions/revoke.ts +++ b/src/server/routes/auth/permissions/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { deletePermissions } from "../../../../db/permissions/deletePermissions"; diff --git a/src/server/routes/backend-wallet/create.ts b/src/server/routes/backend-wallet/create.ts index c25ff560c..b0ef7ba66 100644 --- a/src/server/routes/backend-wallet/create.ts +++ b/src/server/routes/backend-wallet/create.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAddress } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/getAll.ts b/src/server/routes/backend-wallet/getAll.ts index a9a9b1a48..db6502767 100644 --- a/src/server/routes/backend-wallet/getAll.ts +++ b/src/server/routes/backend-wallet/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAllWallets } from "../../../db/wallets/getAllWallets"; diff --git a/src/server/routes/backend-wallet/getBalance.ts b/src/server/routes/backend-wallet/getBalance.ts index 45a9987af..ac4980566 100644 --- a/src/server/routes/backend-wallet/getBalance.ts +++ b/src/server/routes/backend-wallet/getBalance.ts @@ -1,5 +1,5 @@ -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 { AddressSchema } from "../../schemas/address"; @@ -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/getNonce.ts b/src/server/routes/backend-wallet/getNonce.ts index 593cc9ed9..968d9e8aa 100644 --- a/src/server/routes/backend-wallet/getNonce.ts +++ b/src/server/routes/backend-wallet/getNonce.ts @@ -1,4 +1,4 @@ -import { Type, type Static } 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"; diff --git a/src/server/routes/backend-wallet/getTransactions.ts b/src/server/routes/backend-wallet/getTransactions.ts index 5e8dcf89e..099713f6d 100644 --- a/src/server/routes/backend-wallet/getTransactions.ts +++ b/src/server/routes/backend-wallet/getTransactions.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/backend-wallet/getTransactionsByNonce.ts b/src/server/routes/backend-wallet/getTransactionsByNonce.ts index b804df6aa..4dd931073 100644 --- a/src/server/routes/backend-wallet/getTransactionsByNonce.ts +++ b/src/server/routes/backend-wallet/getTransactionsByNonce.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/backend-wallet/import.ts b/src/server/routes/backend-wallet/import.ts index 510059a14..a9930f46e 100644 --- a/src/server/routes/backend-wallet/import.ts +++ b/src/server/routes/backend-wallet/import.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../utils/cache/getConfig"; diff --git a/src/server/routes/backend-wallet/remove.ts b/src/server/routes/backend-wallet/remove.ts index 431c118d8..526401ae4 100644 --- a/src/server/routes/backend-wallet/remove.ts +++ b/src/server/routes/backend-wallet/remove.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 { Address } from "thirdweb"; +import type { 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/resetNonces.ts b/src/server/routes/backend-wallet/resetNonces.ts index 8a7690637..4b707adb4 100644 --- a/src/server/routes/backend-wallet/resetNonces.ts +++ b/src/server/routes/backend-wallet/resetNonces.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 { Address, getAddress } from "thirdweb"; +import { type Address, getAddress } from "thirdweb"; import { deleteAllNonces, syncLatestNonceFromOnchain, @@ -71,7 +71,7 @@ const getUsedBackendWallets = async (): Promise< return keys.map((key) => { const tokens = key.split(":"); return { - chainId: parseInt(tokens[1]), + chainId: Number.parseInt(tokens[1]), walletAddress: getAddress(tokens[2]), }; }); diff --git a/src/server/routes/backend-wallet/sendTransaction.ts b/src/server/routes/backend-wallet/sendTransaction.ts index bb29f9386..11da83e3c 100644 --- a/src/server/routes/backend-wallet/sendTransaction.ts +++ b/src/server/routes/backend-wallet/sendTransaction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address, Hex } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/sendTransactionBatch.ts b/src/server/routes/backend-wallet/sendTransactionBatch.ts index 3d69c4431..5b158804d 100644 --- a/src/server/routes/backend-wallet/sendTransactionBatch.ts +++ b/src/server/routes/backend-wallet/sendTransactionBatch.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address, Hex } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/signMessage.ts b/src/server/routes/backend-wallet/signMessage.ts index ac810a795..29468f50f 100644 --- a/src/server/routes/backend-wallet/signMessage.ts +++ b/src/server/routes/backend-wallet/signMessage.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { isHex, type Hex } from "thirdweb"; +import { type Hex, isHex } from "thirdweb"; import { arbitrumSepolia } from "thirdweb/chains"; import { getWalletDetails, diff --git a/src/server/routes/backend-wallet/signTransaction.ts b/src/server/routes/backend-wallet/signTransaction.ts index c6a73c2c2..5155e3d09 100644 --- a/src/server/routes/backend-wallet/signTransaction.ts +++ b/src/server/routes/backend-wallet/signTransaction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Hex } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/signTypedData.ts b/src/server/routes/backend-wallet/signTypedData.ts index 6c4705eea..2dacb253a 100644 --- a/src/server/routes/backend-wallet/signTypedData.ts +++ b/src/server/routes/backend-wallet/signTypedData.ts @@ -1,6 +1,6 @@ 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 { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/simulateTransaction.ts b/src/server/routes/backend-wallet/simulateTransaction.ts index e30e5d662..c45b976d9 100644 --- a/src/server/routes/backend-wallet/simulateTransaction.ts +++ b/src/server/routes/backend-wallet/simulateTransaction.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { randomUUID } from "node:crypto"; +import { type Static, Type } from "@sinclair/typebox"; 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"; @@ -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/backend-wallet/transfer.ts b/src/server/routes/backend-wallet/transfer.ts index d45b6cd28..d4b90e5e1 100644 --- a/src/server/routes/backend-wallet/transfer.ts +++ b/src/server/routes/backend-wallet/transfer.ts @@ -1,12 +1,12 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { + type Address, NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS, getContract, toWei, - type Address, } from "thirdweb"; import { transfer as transferERC20 } from "thirdweb/extensions/erc20"; import { isContractDeployed, resolvePromisedValue } from "thirdweb/utils"; diff --git a/src/server/routes/backend-wallet/update.ts b/src/server/routes/backend-wallet/update.ts index 5c916d8d8..2e099a0a1 100644 --- a/src/server/routes/backend-wallet/update.ts +++ b/src/server/routes/backend-wallet/update.ts @@ -1,5 +1,5 @@ -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 { AddressSchema } from "../../schemas/address"; diff --git a/src/server/routes/backend-wallet/withdraw.ts b/src/server/routes/backend-wallet/withdraw.ts index e7815ac72..854a0cdf9 100644 --- a/src/server/routes/backend-wallet/withdraw.ts +++ b/src/server/routes/backend-wallet/withdraw.ts @@ -1,11 +1,11 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { - toSerializableTransaction, - toTokens, type Address, type Hex, + toSerializableTransaction, + toTokens, } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { getWalletBalance } from "thirdweb/wallets"; diff --git a/src/server/routes/chain/get.ts b/src/server/routes/chain/get.ts index b01c90bed..9426a1fc9 100644 --- a/src/server/routes/chain/get.ts +++ b/src/server/routes/chain/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getChainMetadata } from "thirdweb/chains"; diff --git a/src/server/routes/chain/getAll.ts b/src/server/routes/chain/getAll.ts index e1b85cf0d..21d811256 100644 --- a/src/server/routes/chain/getAll.ts +++ b/src/server/routes/chain/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { fetchChains } from "@thirdweb-dev/chains"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/configuration/auth/get.ts b/src/server/routes/configuration/auth/get.ts index 9f8bc0f32..6b078fea6 100644 --- a/src/server/routes/configuration/auth/get.ts +++ b/src/server/routes/configuration/auth/get.ts @@ -1,5 +1,5 @@ -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 { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/auth/update.ts b/src/server/routes/configuration/auth/update.ts index 411dd683f..d129607ca 100644 --- a/src/server/routes/configuration/auth/update.ts +++ b/src/server/routes/configuration/auth/update.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/configuration/backend-wallet-balance/get.ts b/src/server/routes/configuration/backend-wallet-balance/get.ts index 1fce8a8ee..35b870caa 100644 --- a/src/server/routes/configuration/backend-wallet-balance/get.ts +++ b/src/server/routes/configuration/backend-wallet-balance/get.ts @@ -1,5 +1,5 @@ -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 { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/backend-wallet-balance/update.ts b/src/server/routes/configuration/backend-wallet-balance/update.ts index edb386e9d..c099ebe42 100644 --- a/src/server/routes/configuration/backend-wallet-balance/update.ts +++ b/src/server/routes/configuration/backend-wallet-balance/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/configuration/cache/get.ts b/src/server/routes/configuration/cache/get.ts index 2d4542585..9389d1077 100644 --- a/src/server/routes/configuration/cache/get.ts +++ b/src/server/routes/configuration/cache/get.ts @@ -1,5 +1,5 @@ -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 { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/cache/update.ts b/src/server/routes/configuration/cache/update.ts index 96d34db0b..515905d0c 100644 --- a/src/server/routes/configuration/cache/update.ts +++ b/src/server/routes/configuration/cache/update.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/configuration/chains/get.ts b/src/server/routes/configuration/chains/get.ts index 588927206..1ce6b49f2 100644 --- a/src/server/routes/configuration/chains/get.ts +++ b/src/server/routes/configuration/chains/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/chains/update.ts b/src/server/routes/configuration/chains/update.ts index 5ae3ed225..54e928b86 100644 --- a/src/server/routes/configuration/chains/update.ts +++ b/src/server/routes/configuration/chains/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/configuration/contract-subscriptions/get.ts b/src/server/routes/configuration/contract-subscriptions/get.ts index 36d42d582..faf4fe8a0 100644 --- a/src/server/routes/configuration/contract-subscriptions/get.ts +++ b/src/server/routes/configuration/contract-subscriptions/get.ts @@ -1,5 +1,5 @@ -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 { diff --git a/src/server/routes/configuration/contract-subscriptions/update.ts b/src/server/routes/configuration/contract-subscriptions/update.ts index 501ce8b4b..318e04c94 100644 --- a/src/server/routes/configuration/contract-subscriptions/update.ts +++ b/src/server/routes/configuration/contract-subscriptions/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index aace6cb26..313a3d044 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/configuration/cors/get.ts b/src/server/routes/configuration/cors/get.ts index 37a1aa9bb..f5c4f52ad 100644 --- a/src/server/routes/configuration/cors/get.ts +++ b/src/server/routes/configuration/cors/get.ts @@ -1,5 +1,5 @@ -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 { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/cors/remove.ts b/src/server/routes/configuration/cors/remove.ts index d32a819ef..36e1dcc94 100644 --- a/src/server/routes/configuration/cors/remove.ts +++ b/src/server/routes/configuration/cors/remove.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index 30a0c6946..afb192c40 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 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"; diff --git a/src/server/routes/configuration/ip/get.ts b/src/server/routes/configuration/ip/get.ts index 99250011e..3d83e6089 100644 --- a/src/server/routes/configuration/ip/get.ts +++ b/src/server/routes/configuration/ip/get.ts @@ -1,5 +1,5 @@ -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 { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/ip/set.ts b/src/server/routes/configuration/ip/set.ts index e92a319ce..ca813b8d8 100644 --- a/src/server/routes/configuration/ip/set.ts +++ b/src/server/routes/configuration/ip/set.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/configuration/transactions/get.ts b/src/server/routes/configuration/transactions/get.ts index 33cdfeac3..c2053a293 100644 --- a/src/server/routes/configuration/transactions/get.ts +++ b/src/server/routes/configuration/transactions/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/transactions/update.ts b/src/server/routes/configuration/transactions/update.ts index c94db43ce..715f52ea1 100644 --- a/src/server/routes/configuration/transactions/update.ts +++ b/src/server/routes/configuration/transactions/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/configuration/wallets/get.ts b/src/server/routes/configuration/wallets/get.ts index d170cbea5..68516bd71 100644 --- a/src/server/routes/configuration/wallets/get.ts +++ b/src/server/routes/configuration/wallets/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { WalletType } from "../../../../schema/wallet"; diff --git a/src/server/routes/configuration/wallets/update.ts b/src/server/routes/configuration/wallets/update.ts index d21182227..08d5e77e9 100644 --- a/src/server/routes/configuration/wallets/update.ts +++ b/src/server/routes/configuration/wallets/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/contract/events/getAllEvents.ts b/src/server/routes/contract/events/getAllEvents.ts index a28264b45..787dce6ec 100644 --- a/src/server/routes/contract/events/getAllEvents.ts +++ b/src/server/routes/contract/events/getAllEvents.ts @@ -1,5 +1,5 @@ -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 { @@ -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/getContractEventLogs.ts b/src/server/routes/contract/events/getContractEventLogs.ts index 85e0a0c3c..632629520 100644 --- a/src/server/routes/contract/events/getContractEventLogs.ts +++ b/src/server/routes/contract/events/getContractEventLogs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContractEventLogsByBlockAndTopics } from "../../../../db/contractEventLogs/getContractEventLogs"; diff --git a/src/server/routes/contract/events/getEventLogsByTimestamp.ts b/src/server/routes/contract/events/getEventLogsByTimestamp.ts index 2cde46d21..7ad1c18c2 100644 --- a/src/server/routes/contract/events/getEventLogsByTimestamp.ts +++ b/src/server/routes/contract/events/getEventLogsByTimestamp.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getEventLogsByBlockTimestamp } from "../../../../db/contractEventLogs/getContractEventLogs"; diff --git a/src/server/routes/contract/events/getEvents.ts b/src/server/routes/contract/events/getEvents.ts index f30839eba..e88fb21a3 100644 --- a/src/server/routes/contract/events/getEvents.ts +++ b/src/server/routes/contract/events/getEvents.ts @@ -1,5 +1,5 @@ -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 { diff --git a/src/server/routes/contract/events/paginateEventLogs.ts b/src/server/routes/contract/events/paginateEventLogs.ts index 02a4c5212..cdb607f55 100644 --- a/src/server/routes/contract/events/paginateEventLogs.ts +++ b/src/server/routes/contract/events/paginateEventLogs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfiguration } from "../../../../db/configuration/getConfiguration"; diff --git a/src/server/routes/contract/extensions/account/index.ts b/src/server/routes/contract/extensions/account/index.ts index 23ba14c0d..63c15cc07 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/getAllAdmins"; import { getAllSessions } from "./read/getAllSessions"; import { grantAdmin } from "./write/grantAdmin"; diff --git a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts index 13d5d38a2..68127daca 100644 --- a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts +++ b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts @@ -1,5 +1,5 @@ -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 { diff --git a/src/server/routes/contract/extensions/account/read/getAllSessions.ts b/src/server/routes/contract/extensions/account/read/getAllSessions.ts index fd3bd971a..dd57fccc5 100644 --- a/src/server/routes/contract/extensions/account/read/getAllSessions.ts +++ b/src/server/routes/contract/extensions/account/read/getAllSessions.ts @@ -1,5 +1,5 @@ -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 { sessionSchema } from "../../../../../schemas/account"; diff --git a/src/server/routes/contract/extensions/account/write/grantAdmin.ts b/src/server/routes/contract/extensions/account/write/grantAdmin.ts index 6d5b11e82..3ac8dbe34 100644 --- a/src/server/routes/contract/extensions/account/write/grantAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/grantAdmin.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/account/write/grantSession.ts b/src/server/routes/contract/extensions/account/write/grantSession.ts index 0e64558d7..1b1b2bc64 100644 --- a/src/server/routes/contract/extensions/account/write/grantSession.ts +++ b/src/server/routes/contract/extensions/account/write/grantSession.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts index 2e21671aa..74de36c0e 100644 --- a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/account/write/revokeSession.ts b/src/server/routes/contract/extensions/account/write/revokeSession.ts index f71e40218..e12c7bf84 100644 --- a/src/server/routes/contract/extensions/account/write/revokeSession.ts +++ b/src/server/routes/contract/extensions/account/write/revokeSession.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/account/write/updateSession.ts b/src/server/routes/contract/extensions/account/write/updateSession.ts index 46da67695..560fdc7c5 100644 --- a/src/server/routes/contract/extensions/account/write/updateSession.ts +++ b/src/server/routes/contract/extensions/account/write/updateSession.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/accountFactory/index.ts b/src/server/routes/contract/extensions/accountFactory/index.ts index 1f10720bf..1b1ab07d9 100644 --- a/src/server/routes/contract/extensions/accountFactory/index.ts +++ b/src/server/routes/contract/extensions/accountFactory/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { getAllAccounts } from "./read/getAllAccounts"; import { getAssociatedAccounts } from "./read/getAssociatedAccounts"; import { isAccountDeployed } from "./read/isAccountDeployed"; diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts index 5a5208679..0226183db 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts @@ -1,5 +1,5 @@ -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 { diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts index 66f1ad35a..46eb7a52e 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts @@ -1,5 +1,5 @@ -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 { AddressSchema } from "../../../../../schemas/address"; diff --git a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts index 0ccbbde66..23fdfb4b1 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts @@ -1,5 +1,5 @@ -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 { AddressSchema } from "../../../../../schemas/address"; diff --git a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts index 635da28ae..59194f344 100644 --- a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts index 5b100dd11..5efb82ddc 100644 --- a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/get.ts b/src/server/routes/contract/extensions/erc1155/read/get.ts index c9edfafca..69b6f51e3 100644 --- a/src/server/routes/contract/extensions/erc1155/read/get.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts index 62f7807b4..cd9d8791d 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getAll.ts b/src/server/routes/contract/extensions/erc1155/read/getAll.ts index 8d1018a5b..e823832d3 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts index 5bc021d5d..72fbaae90 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts index d50a6af03..85376bfe1 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts index 59a130fb0..fdfaf22fc 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts index e56383bd0..bda66988d 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts index f97a3089a..699e745f5 100644 --- a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts index 85e8b8d7b..d00efef77 100644 --- a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Address, type Hex } from "thirdweb"; +import { type Address, type Hex, getContract } from "thirdweb"; import type { NFTInput } from "thirdweb/dist/types/utils/nft/parseNft"; import { generateMintSignature } from "thirdweb/extensions/erc1155"; import { getAccount } from "../../../../../../utils/account"; @@ -12,10 +12,10 @@ import { thirdwebClient } from "../../../../../../utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { + type ercNFTResponseType, nftInputSchema, signature1155InputSchema, signature1155OutputSchema, - type ercNFTResponseType, } from "../../../../../schemas/nft"; import { TokenAmountStringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts index ca225d4e9..f3c3647e2 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts index 54de23b04..8df012d69 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts index d8e60a5ec..83de31510 100644 --- a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts +++ b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/burn.ts b/src/server/routes/contract/extensions/erc1155/write/burn.ts index 7c1a126df..8cbeee480 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burn.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts index d4dedc504..3e2cb89cf 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts index 015284d09..d868ceb35 100644 --- a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts index f48e90bea..9936c7a93 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts index 1d31b92aa..5c9091f4a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts index 0f72457f8..93f412999 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts index db5a05f60..8e1a04351 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts index 702c5ae4e..bf8022a08 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts index cf014efaf..68c51cb3c 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts index adc3ed3e8..cf04f0ec3 100644 --- a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { SignedPayload1155 } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; import type { FastifyInstance } from "fastify"; diff --git a/src/server/routes/contract/extensions/erc1155/write/transfer.ts b/src/server/routes/contract/extensions/erc1155/write/transfer.ts index 4db2395ec..e394ad48a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transfer.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Hex } from "thirdweb"; +import { type Hex, getContract } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; import { getChain } from "../../../../../../utils/chain"; import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; diff --git a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts index 385857075..a65d89c02 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Hex } from "thirdweb"; +import { type Hex, getContract } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; import { getChain } from "../../../../../../utils/chain"; import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; diff --git a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts index 21bb87a40..c4d96087a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts index 3c020ff24..38e818e08 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts index 128fd9f86..65e6d7c40 100644 --- a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts index edade3a9f..74e72ac27 100644 --- a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/canClaim.ts b/src/server/routes/contract/extensions/erc20/read/canClaim.ts index b38495b17..f1addc3b8 100644 --- a/src/server/routes/contract/extensions/erc20/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc20/read/canClaim.ts @@ -1,5 +1,5 @@ -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 { diff --git a/src/server/routes/contract/extensions/erc20/read/get.ts b/src/server/routes/contract/extensions/erc20/read/get.ts index c89338d37..b7cef0718 100644 --- a/src/server/routes/contract/extensions/erc20/read/get.ts +++ b/src/server/routes/contract/extensions/erc20/read/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts index 8013f7cff..50c068ea4 100644 --- a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts index 578466a13..faaae74f1 100644 --- a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts index 832ce01ef..4f0b51578 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts index ad7659b05..6fb5d3ad7 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts index 341aabf9d..fb384130a 100644 --- a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Address, type Hex } from "thirdweb"; +import { type Address, type Hex, getContract } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc20"; import { getAccount } from "../../../../../../utils/account"; import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; @@ -10,9 +10,9 @@ import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; import { thirdwebClient } from "../../../../../../utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { + type erc20ResponseType, signature20InputSchema, signature20OutputSchema, - type erc20ResponseType, } from "../../../../../schemas/erc20"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts index fd3399e97..755e5031a 100644 --- a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/write/burn.ts b/src/server/routes/contract/extensions/erc20/write/burn.ts index 54ad7e7ce..5e643fba1 100644 --- a/src/server/routes/contract/extensions/erc20/write/burn.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts index 956d9f9b3..49a42c98f 100644 --- a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts index 2fd89eb9c..1aeda9ace 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/mintTo.ts b/src/server/routes/contract/extensions/erc20/write/mintTo.ts index db3a9968e..b91f7d4e5 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts index 80fd18b02..df9c0618e 100644 --- a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts +++ b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts index 57ce2c8c8..f394cee3d 100644 --- a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts index 38fd423ff..7244d6be0 100644 --- a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { SignedPayload20 } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; import type { FastifyInstance } from "fastify"; diff --git a/src/server/routes/contract/extensions/erc20/write/transfer.ts b/src/server/routes/contract/extensions/erc20/write/transfer.ts index 512903a44..c3d3b167e 100644 --- a/src/server/routes/contract/extensions/erc20/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc20/write/transfer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; diff --git a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts index ce9ed134c..d01f81295 100644 --- a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; diff --git a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts index 99cd79b48..c4ed61ea1 100644 --- a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts index 72b9e2aef..267d5f9f4 100644 --- a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/canClaim.ts b/src/server/routes/contract/extensions/erc721/read/canClaim.ts index d80226ccd..c47ae7866 100644 --- a/src/server/routes/contract/extensions/erc721/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc721/read/canClaim.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/get.ts b/src/server/routes/contract/extensions/erc721/read/get.ts index 11faf6bdc..bdbf7382b 100644 --- a/src/server/routes/contract/extensions/erc721/read/get.ts +++ b/src/server/routes/contract/extensions/erc721/read/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts index 88164318d..a72065cf8 100644 --- a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getAll.ts b/src/server/routes/contract/extensions/erc721/read/getAll.ts index 043db6f74..73ea5fc13 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc721/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts index 9158456f5..a8a9af036 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts index c4b069987..c0d78941b 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts index eee8854cd..ea58d116c 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getOwned.ts b/src/server/routes/contract/extensions/erc721/read/getOwned.ts index 847d69c36..f83263f0e 100644 --- a/src/server/routes/contract/extensions/erc721/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc721/read/getOwned.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/isApproved.ts b/src/server/routes/contract/extensions/erc721/read/isApproved.ts index b8ecc6e8a..a418f7f03 100644 --- a/src/server/routes/contract/extensions/erc721/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc721/read/isApproved.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts index 0fca0a1f2..88c7124aa 100644 --- a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Address, type Hex } from "thirdweb"; +import { type Address, type Hex, getContract } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc721"; import { getAccount } from "../../../../../../utils/account"; import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; @@ -10,9 +10,9 @@ import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; import { thirdwebClient } from "../../../../../../utils/sdk"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { + type ercNFTResponseType, signature721InputSchema, signature721OutputSchema, - type ercNFTResponseType, } from "../../../../../schemas/nft"; import { signature721InputSchemaV5, diff --git a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts index 0636354a2..74546b357 100644 --- a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts +++ b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts @@ -1,14 +1,14 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { createHash, getRandomValues } from "node:crypto"; +import { type Static, Type } from "@sinclair/typebox"; import { MintRequest721 } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { createHash, getRandomValues } from "node:crypto"; import { + type Hex, ZERO_ADDRESS, getContract, isHex, uint8ArrayToHex, - type Hex, } from "thirdweb"; import { primarySaleRecipient as getDefaultPrimarySaleRecipient, diff --git a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts index 94d6d91bb..b07aad2a8 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/totalCount.ts b/src/server/routes/contract/extensions/erc721/read/totalCount.ts index 7599028de..457d38bd6 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts index 5eb39d2c7..e7cb63fcc 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/write/burn.ts b/src/server/routes/contract/extensions/erc721/write/burn.ts index f0591eafa..18c8e88a9 100644 --- a/src/server/routes/contract/extensions/erc721/write/burn.ts +++ b/src/server/routes/contract/extensions/erc721/write/burn.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts index c553454f8..8624af82b 100644 --- a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts index 79c14a801..05851d19c 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mintTo.ts index 8099991eb..dc3458937 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintTo.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts index b521adf4d..ced42e7a4 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts index 8b3f8e7b3..249cc8855 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts index 8e67bdaae..41be52b5a 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 { claimConditionInputSchema, - sanitizedClaimConditionInputSchema, + type sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, @@ -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/signatureMint.ts b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts index 2a85bb169..c79dcf166 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 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..3bfac65c9 100644 --- a/src/server/routes/contract/extensions/erc721/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc721/write/transfer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; diff --git a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts index 404086221..2f7e9c029 100644 --- a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; diff --git a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts index 8b8faaa49..004d0e9f5 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 { claimConditionInputSchema, - sanitizedClaimConditionInputSchema, + type sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, @@ -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/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts index 48ba8e64f..8bcc17300 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts @@ -1,5 +1,5 @@ -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"; 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..02278ce23 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; @@ -20,44 +20,42 @@ const responseSchema = Type.Object({ result: Type.Array(directListingV3OutputSchema), }); -responseSchema.example = [ - { - result: [ - { - assetContractAddress: "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", - tokenId: "0", - currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", - quantity: "1", - pricePerToken: "10000000000", - isReservedListing: false, +responseSchema.example = { + result: [ + { + assetContractAddress: "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", + tokenId: "0", + currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + quantity: "1", + pricePerToken: "10000000000", + isReservedListing: false, + id: "0", + currencyValuePerToken: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, + asset: { id: "0", - currencyValuePerToken: { - name: "MATIC", - symbol: "MATIC", - decimals: 18, - value: "10000000000", - displayValue: "0.00000001", - }, - asset: { - id: "0", - uri: "ipfs://QmPw2Dd1dnB6dQCnqGayCTnxUxHrB7m4YFeyph6PYPMboP/0", - name: "TJ-Origin", - description: "Origin", - external_url: "", - attributes: [ - { - trait_type: "Mode", - value: "GOD", - }, - ], - }, - status: 1, - startTimeInSeconds: 1686006043, - endTimeInSeconds: 1686610889, + uri: "ipfs://QmPw2Dd1dnB6dQCnqGayCTnxUxHrB7m4YFeyph6PYPMboP/0", + name: "TJ-Origin", + description: "Origin", + external_url: "", + attributes: [ + { + trait_type: "Mode", + value: "GOD", + }, + ], }, - ], - }, -]; + status: 1, + startTimeInSeconds: 1686006043, + endTimeInSeconds: 1686610889, + }, + ], +}; // LOGIC export async function directListingsGetAll(fastify: FastifyInstance) { 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..aa3110e0e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..c3a4254eb 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; @@ -27,18 +27,36 @@ responseSchema.examples = [ { result: [ { - metadata: { + assetContractAddress: "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", + tokenId: "0", + currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + quantity: "1", + pricePerToken: "10000000000", + isReservedListing: false, + id: "0", + currencyValuePerToken: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, + asset: { id: "0", - uri: "ipfs://QmdaWX1GEwnFW4NooYRej5BQybKNLdxkWtMwyw8KiWRueS/0", - name: "My Edition NFT", - description: "My Edition NFT description", - image: - "ipfs://QmciR3WLJsf2BgzTSjbG5zCxsrEQ8PqsHK7JWGWsDSNo46/nft.png", + uri: "ipfs://QmPw2Dd1dnB6dQCnqGayCTnxUxHrB7m4YFeyph6PYPMboP/0", + name: "TJ-Origin", + description: "Origin", + external_url: "", + attributes: [ + { + trait_type: "Mode", + value: "GOD", + }, + ], }, - owner: "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", - type: "ERC1155", - supply: "100", - quantityOwned: "100", + status: 1, + startTimeInSeconds: 1686006043, + endTimeInSeconds: 1686610889, }, ], }, 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..ba1bdeabc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; @@ -31,7 +31,7 @@ export async function directListingsGetTotalCount(fastify: FastifyInstance) { method: "GET", url: "/marketplace/:chain/:contractAddress/direct-listings/get-total-count", schema: { - summary: "Transfer token from wallet", + summary: "Get Listing Count", description: "Get the total number of direct listings on this marketplace contract.", tags: ["Marketplace-DirectListings"], 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..97dc4f741 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..095adc8e0 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..a13b6eec8 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; 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..8f4d28b30 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -17,7 +17,7 @@ import { getChainIdFromChain } from "../../../../../../utils/chain"; const requestSchema = marketplaceV3ContractParamSchema; const requestBodySchema = Type.Object({ listingId: Type.String({ - description: "The ID of the listing you want to approve a buyer for.", + description: "The ID of the listing you want to buy.", }), quantity: Type.String({ description: "The number of tokens to buy (default is 1 for ERC721 NFTs).", 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..01aeb9990 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; 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..d6e9037bf 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; 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..5a90b2644 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -18,11 +18,11 @@ import { getChainIdFromChain } from "../../../../../../utils/chain"; const requestSchema = marketplaceV3ContractParamSchema; const requestBodySchema = Type.Object({ listingId: Type.String({ - description: "The ID of the listing you want to approve a buyer for.", + description: "The ID of the listing you want to revoke buyer approval for.", }), buyerAddress: { ...AddressSchema, - description: "The wallet address of the buyer to approve.", + description: "The wallet address of the buyer to revoke approval for.", }, ...txOverridesWithValueSchema.properties, }); 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..7b63e1d2f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -18,11 +18,12 @@ import { getChainIdFromChain } from "../../../../../../utils/chain"; const requestSchema = marketplaceV3ContractParamSchema; const requestBodySchema = Type.Object({ listingId: Type.String({ - description: "The ID of the listing you want to approve a buyer for.", + description: + "The ID of the listing you want to revoke currency approval for.", }), currencyContractAddress: { ...AddressSchema, - description: "The wallet address of the buyer to approve.", + description: "The address of the currency to revoke approval for.", }, ...txOverridesWithValueSchema.properties, }); 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..51af8e79a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; 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..0d4fa5c5a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..5fdf64bdd 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..e951ef6d8 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; @@ -27,18 +27,38 @@ responseSchema.examples = [ { result: [ { - metadata: { + assetContractAddress: "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", + tokenId: "0", + currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + quantity: "1", + id: "0", + minimumBidAmount: "10000000000", + buyoutBidAmount: "10000000000", + buyoutCurrencyValue: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, + timeBufferInSeconds: 600, + bidBufferBps: 100, + startTimeInSeconds: 1686006043, + endTimeInSeconds: 1686610889, + asset: { id: "0", - uri: "ipfs://QmdaWX1GEwnFW4NooYRej5BQybKNLdxkWtMwyw8KiWRueS/0", - name: "My Edition NFT", - description: "My Edition NFT description", - image: - "ipfs://QmciR3WLJsf2BgzTSjbG5zCxsrEQ8PqsHK7JWGWsDSNo46/nft.png", + uri: "ipfs://QmPw2Dd1dnB6dQCnqGayCTnxUxHrB7m4YFeyph6PYPMboP/0", + name: "TJ-Origin", + description: "Origin", + external_url: "", + attributes: [ + { + trait_type: "Mode", + value: "GOD", + }, + ], }, - owner: "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", - type: "ERC1155", - supply: "100", - quantityOwned: "100", + status: 1, }, ], }, 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..460165e3c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; @@ -26,7 +26,7 @@ const responseSchema = Type.Object({ responseSchema.examples = [ { - result: "1", + result: 1, }, ]; 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..4ca06dde7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; @@ -24,7 +24,7 @@ const responseSchema = Type.Object({ responseSchema.examples = [ { - result: "1", + result: "10000000000", }, ]; 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..b33daeaf5 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..ef253f402 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..3ee8b9b9b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; @@ -24,7 +24,19 @@ const responseSchema = Type.Object({ responseSchema.examples = [ { - result: "0x...", + result: { + auctionId: "0", + bidderAddress: "0x...", + currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + bidAmount: "10000000000", + bidAmountCurrencyValue: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, + }, }, ]; 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..1caeb0378 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..7f6411e2e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to buy NFT(s) from.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -40,6 +43,7 @@ export async function englishAuctionsBuyoutAuction(fastify: FastifyInstance) { description: "Buyout the listing for this auction.", tags: ["Marketplace-EnglishAuctions"], operationId: "buyoutEnglishAuction", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -51,11 +55,12 @@ export async function englishAuctionsBuyoutAuction(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -72,6 +77,8 @@ export async function englishAuctionsBuyoutAuction(fastify: FastifyInstance) { chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { 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..fe1234ce7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to cancel auction.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -41,6 +44,7 @@ export async function englishAuctionsCancelAuction(fastify: FastifyInstance) { "Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made.", tags: ["Marketplace-EnglishAuctions"], operationId: "cancelEnglishAuction", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -52,11 +56,12 @@ export async function englishAuctionsCancelAuction(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -73,6 +78,8 @@ export async function englishAuctionsCancelAuction(fastify: FastifyInstance) { chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { 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..c3bdd88ec 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to execute the sale for.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -45,6 +48,7 @@ You must also call closeAuctionForSeller to execute the sale for the seller, meaning the seller receives the payment from the highest bid.`, tags: ["Marketplace-EnglishAuctions"], operationId: "closeEnglishAuctionForBidder", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -56,11 +60,12 @@ meaning the seller receives the payment from the highest bid.`, handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -77,6 +82,8 @@ meaning the seller receives the payment from the highest bid.`, chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { 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..ff4c76ac2 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to execute the sale for.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -44,6 +47,7 @@ execute the sale for the seller, meaning the seller receives the payment from th You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s).`, tags: ["Marketplace-EnglishAuctions"], operationId: "closeEnglishAuctionForSeller", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -55,11 +59,12 @@ You must also call closeAuctionForBidder to execute the sale for the buyer, mean handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -76,6 +81,8 @@ You must also call closeAuctionForBidder to execute the sale for the buyer, mean chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { 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..1fec9702e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts @@ -1,4 +1,4 @@ -import type { Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -10,11 +10,16 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; -const requestBodySchema = englishAuctionInputSchema; +const requestBodySchema = Type.Object({ + ...englishAuctionInputSchema.properties, + ...txOverridesWithValueSchema.properties, +}); requestBodySchema.examples = [ { @@ -47,6 +52,7 @@ export async function englishAuctionsCreateAuction(fastify: FastifyInstance) { "Create an English auction listing on this marketplace contract.", tags: ["Marketplace-EnglishAuctions"], operationId: "createEnglishAuction", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -69,11 +75,13 @@ export async function englishAuctionsCreateAuction(fastify: FastifyInstance) { endTimestamp, bidBufferBps, timeBufferInSeconds, + txOverrides, } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -100,6 +108,8 @@ export async function englishAuctionsCreateAuction(fastify: FastifyInstance) { chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { 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..a8a4fb4a9 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to execute the sale for.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -42,6 +45,7 @@ This means the NFT(s) will be transferred to the buyer and the seller will recei This function can only be called after the auction has ended.`, tags: ["Marketplace-EnglishAuctions"], operationId: "executeEnglishAuctionSale", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -53,11 +57,12 @@ This function can only be called after the auction has ended.`, handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -73,6 +78,8 @@ This function can only be called after the auction has ended.`, chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { 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..b67419a7c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -21,6 +23,7 @@ const requestBodySchema = Type.Object({ description: "The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount for the next bid.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -45,6 +48,7 @@ export async function englishAuctionsMakeBid(fastify: FastifyInstance) { description: "Place a bid on an English auction listing.", tags: ["Marketplace-EnglishAuctions"], operationId: "makeEnglishAuctionBid", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -56,11 +60,12 @@ export async function englishAuctionsMakeBid(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId, bidAmount } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, bidAmount, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -79,6 +84,8 @@ export async function englishAuctionsMakeBid(fastify: FastifyInstance) { chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/contract/extensions/marketplaceV3/index.ts b/src/server/routes/contract/extensions/marketplaceV3/index.ts index aa637a707..e2b8638d3 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/index.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { directListingsGetAll } from "./directListings/read/getAll"; import { directListingsGetAllValid } from "./directListings/read/getAllValid"; import { directListingsGetListing } from "./directListings/read/getListing"; 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..796b0b59f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..f3bd6e5c5 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..5049048fe 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..6bcaae250 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; 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..0b40594c3 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; 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..0390b51a7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; 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..9e7e1dfb1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index 56cbb5b10..ee7bf48b6 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; @@ -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 0d3e769fa..bd2845e94 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; @@ -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 79255c7f8..660d645f5 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -1,6 +1,6 @@ -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 { @@ -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 268254418..9fb7a9bda 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -1,5 +1,5 @@ -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 { abiFunctionSchema } from "../../../schemas/contract"; @@ -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.ts b/src/server/routes/contract/roles/read/get.ts index a10b1e827..89465e1c0 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../utils/cache/getContract"; @@ -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/roles/read/getAll.ts b/src/server/routes/contract/roles/read/getAll.ts index 175b626df..87a217d4c 100644 --- a/src/server/routes/contract/roles/read/getAll.ts +++ b/src/server/routes/contract/roles/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../utils/cache/getContract"; @@ -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/write/grant.ts b/src/server/routes/contract/roles/write/grant.ts index c82ad2269..dd1f31a75 100644 --- a/src/server/routes/contract/roles/write/grant.ts +++ b/src/server/routes/contract/roles/write/grant.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/roles/write/revoke.ts b/src/server/routes/contract/roles/write/revoke.ts index 4b1173132..2f47ceb30 100644 --- a/src/server/routes/contract/roles/write/revoke.ts +++ b/src/server/routes/contract/roles/write/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts index c6282d135..cad04a4d2 100644 --- a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts @@ -1,5 +1,5 @@ -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 { royaltySchema } from "../../../../schemas/contract"; diff --git a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts index fec257ad5..2e72836ed 100644 --- a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts index acfb5c8fd..0d4935b16 100644 --- a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts index 4d12d72b0..d4ff6f424 100644 --- a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/addContractSubscription.ts index bddd24fc1..0c6b84a71 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/addContractSubscription.ts @@ -1,5 +1,5 @@ -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"; @@ -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 { // 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/getContractIndexedBlockRange.ts b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts index e708cd8b2..8f3ebbeff 100644 --- a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts +++ b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContractEventLogsIndexedBlockRange } from "../../../../db/contractEventLogs/getContractEventLogs"; diff --git a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts b/src/server/routes/contract/subscriptions/getContractSubscriptions.ts index 81fb1ac2d..e02fb0891 100644 --- a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts +++ b/src/server/routes/contract/subscriptions/getContractSubscriptions.ts @@ -1,5 +1,5 @@ -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 { diff --git a/src/server/routes/contract/subscriptions/getLatestBlock.ts b/src/server/routes/contract/subscriptions/getLatestBlock.ts index 49f81e09c..5155aed0d 100644 --- a/src/server/routes/contract/subscriptions/getLatestBlock.ts +++ b/src/server/routes/contract/subscriptions/getLatestBlock.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getLastIndexedBlock } from "../../../../db/chainIndexers/getChainIndexer"; diff --git a/src/server/routes/contract/subscriptions/removeContractSubscription.ts b/src/server/routes/contract/subscriptions/removeContractSubscription.ts index 3b0711c75..f467ac506 100644 --- a/src/server/routes/contract/subscriptions/removeContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/removeContractSubscription.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/transactions/getTransactionReceipts.ts b/src/server/routes/contract/transactions/getTransactionReceipts.ts index 87b90a530..e0baa6fd0 100644 --- a/src/server/routes/contract/transactions/getTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/getTransactionReceipts.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts b/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts index 2c76ec6da..3357d2825 100644 --- a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts +++ b/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getTransactionReceiptsByBlockTimestamp } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; diff --git a/src/server/routes/contract/transactions/paginateTransactionReceipts.ts b/src/server/routes/contract/transactions/paginateTransactionReceipts.ts index 0d13b9b1d..68f558af3 100644 --- a/src/server/routes/contract/transactions/paginateTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/paginateTransactionReceipts.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfiguration } from "../../../../db/configuration/getConfiguration"; diff --git a/src/server/routes/contract/write/write.ts b/src/server/routes/contract/write/write.ts index b47049786..5e5a0667b 100644 --- a/src/server/routes/contract/write/write.ts +++ b/src/server/routes/contract/write/write.ts @@ -1,8 +1,8 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prepareContractCall, resolveMethod } from "thirdweb"; -import { parseAbiParams, type AbiFunction } from "thirdweb/utils"; +import { type AbiFunction, parseAbiParams } from "thirdweb/utils"; import { getContractV5 } from "../../../../utils/cache/getContractv5"; import { prettifyError } from "../../../../utils/error"; import { queueTransaction } from "../../../../utils/transaction/queueTransation"; diff --git a/src/server/routes/deploy/contractTypes.ts b/src/server/routes/deploy/contractTypes.ts index 9340bbb23..57ba64eaa 100644 --- a/src/server/routes/deploy/contractTypes.ts +++ b/src/server/routes/deploy/contractTypes.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/sharedApiSchemas"; diff --git a/src/server/routes/deploy/index.ts b/src/server/routes/deploy/index.ts index 15301f23b..1cde592c2 100644 --- a/src/server/routes/deploy/index.ts +++ b/src/server/routes/deploy/index.ts @@ -1,4 +1,6 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; +import { contractTypes } from "./contractTypes"; +import { deployPrebuilt } from "./prebuilt"; import { deployPrebuiltEdition } from "./prebuilts/edition"; import { deployPrebuiltEditionDrop } from "./prebuilts/editionDrop"; import { deployPrebuiltMarketplaceV3 } from "./prebuilts/marketplaceV3"; @@ -11,9 +13,7 @@ import { deployPrebuiltSplit } from "./prebuilts/split"; import { deployPrebuiltToken } from "./prebuilts/token"; import { deployPrebuiltTokenDrop } from "./prebuilts/tokenDrop"; import { deployPrebuiltVote } from "./prebuilts/vote"; -import { deployPrebuilt } from "./prebuilt"; import { deployPublished } from "./published"; -import { contractTypes } from "./contractTypes"; 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 38815a755..c7b709e13 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../db/transactions/queueTx"; import { getSdk } from "../../../utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; diff --git a/src/server/routes/deploy/prebuilts/edition.ts b/src/server/routes/deploy/prebuilts/edition.ts index 15b99b65b..047bb20e4 100644 --- a/src/server/routes/deploy/prebuilts/edition.ts +++ b/src/server/routes/deploy/prebuilts/edition.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/editionDrop.ts b/src/server/routes/deploy/prebuilts/editionDrop.ts index 9e2c11bbd..ba4ca0eaa 100644 --- a/src/server/routes/deploy/prebuilts/editionDrop.ts +++ b/src/server/routes/deploy/prebuilts/editionDrop.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/marketplaceV3.ts b/src/server/routes/deploy/prebuilts/marketplaceV3.ts index 8635946c9..b2a2b7512 100644 --- a/src/server/routes/deploy/prebuilts/marketplaceV3.ts +++ b/src/server/routes/deploy/prebuilts/marketplaceV3.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/multiwrap.ts b/src/server/routes/deploy/prebuilts/multiwrap.ts index 95df0dd8a..0e789d8dc 100644 --- a/src/server/routes/deploy/prebuilts/multiwrap.ts +++ b/src/server/routes/deploy/prebuilts/multiwrap.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/nftCollection.ts b/src/server/routes/deploy/prebuilts/nftCollection.ts index 002f6e629..1c0ff6ebb 100644 --- a/src/server/routes/deploy/prebuilts/nftCollection.ts +++ b/src/server/routes/deploy/prebuilts/nftCollection.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/nftDrop.ts b/src/server/routes/deploy/prebuilts/nftDrop.ts index 740df4fe8..4acc0b7de 100644 --- a/src/server/routes/deploy/prebuilts/nftDrop.ts +++ b/src/server/routes/deploy/prebuilts/nftDrop.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/pack.ts b/src/server/routes/deploy/prebuilts/pack.ts index 1c7c0e44f..1422e754a 100644 --- a/src/server/routes/deploy/prebuilts/pack.ts +++ b/src/server/routes/deploy/prebuilts/pack.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/signatureDrop.ts b/src/server/routes/deploy/prebuilts/signatureDrop.ts index f5f54d385..1b39cddcf 100644 --- a/src/server/routes/deploy/prebuilts/signatureDrop.ts +++ b/src/server/routes/deploy/prebuilts/signatureDrop.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/split.ts b/src/server/routes/deploy/prebuilts/split.ts index 8b9435a3e..134c1aae4 100644 --- a/src/server/routes/deploy/prebuilts/split.ts +++ b/src/server/routes/deploy/prebuilts/split.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/token.ts b/src/server/routes/deploy/prebuilts/token.ts index 13980f951..03b18c47c 100644 --- a/src/server/routes/deploy/prebuilts/token.ts +++ b/src/server/routes/deploy/prebuilts/token.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/tokenDrop.ts b/src/server/routes/deploy/prebuilts/tokenDrop.ts index 6129ecfa7..fcc68e0aa 100644 --- a/src/server/routes/deploy/prebuilts/tokenDrop.ts +++ b/src/server/routes/deploy/prebuilts/tokenDrop.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/vote.ts b/src/server/routes/deploy/prebuilts/vote.ts index 2073993cd..7c1af948a 100644 --- a/src/server/routes/deploy/prebuilts/vote.ts +++ b/src/server/routes/deploy/prebuilts/vote.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 { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/published.ts b/src/server/routes/deploy/published.ts index 96fd698bb..05c26ef3f 100644 --- a/src/server/routes/deploy/published.ts +++ b/src/server/routes/deploy/published.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/home.ts b/src/server/routes/home.ts index 212126800..dfa9d7386 100644 --- a/src/server/routes/home.ts +++ b/src/server/routes/home.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index 9daf6b452..eb6215ee4 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -58,9 +58,9 @@ import { getEvents } from "./contract/events/getEvents"; import { pageEventLogs } from "./contract/events/paginateEventLogs"; import { accountRoutes } from "./contract/extensions/account"; import { accountFactoryRoutes } from "./contract/extensions/accountFactory"; -import { erc1155Routes } from "./contract/extensions/erc1155"; import { erc20Routes } from "./contract/extensions/erc20"; import { erc721Routes } from "./contract/extensions/erc721"; +import { erc1155Routes } from "./contract/extensions/erc1155"; import { marketplaceV3Routes } from "./contract/extensions/marketplaceV3/index"; import { getABI } from "./contract/metadata/abi"; import { extractEvents } from "./contract/metadata/events"; diff --git a/src/server/routes/relayer/create.ts b/src/server/routes/relayer/create.ts index 1cda9f9b1..acb6d6b2e 100644 --- a/src/server/routes/relayer/create.ts +++ b/src/server/routes/relayer/create.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../db/client"; diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index 866f18ac8..471a65ad8 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { ethers, utils } from "ethers"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; @@ -60,6 +60,7 @@ const requestBodySchema = Type.Union([ }), ]); +// eslint-disable-next-line @typescript-eslint/no-unused-vars const responseBodySchema = Type.Composite([ Type.Object({ result: Type.Optional( diff --git a/src/server/routes/relayer/revoke.ts b/src/server/routes/relayer/revoke.ts index c69b8515d..8c57ed696 100644 --- a/src/server/routes/relayer/revoke.ts +++ b/src/server/routes/relayer/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../db/client"; diff --git a/src/server/routes/relayer/update.ts b/src/server/routes/relayer/update.ts index aca004e0f..fbb55a684 100644 --- a/src/server/routes/relayer/update.ts +++ b/src/server/routes/relayer/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../db/client"; diff --git a/src/server/routes/system/health.ts b/src/server/routes/system/health.ts index 896dab30d..e0eb9deb9 100644 --- a/src/server/routes/system/health.ts +++ b/src/server/routes/system/health.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { isDatabaseReachable } from "../../../db/client"; @@ -32,6 +32,7 @@ const ReplySchemaError = Type.Object({ error: Type.String(), }); +// eslint-disable-next-line @typescript-eslint/no-unused-vars const responseBodySchema = Type.Union([ReplySchemaOk, ReplySchemaError]); export async function healthCheck(fastify: FastifyInstance) { diff --git a/src/server/routes/system/queue.ts b/src/server/routes/system/queue.ts index 92763139e..4ac875c83 100644 --- a/src/server/routes/system/queue.ts +++ b/src/server/routes/system/queue.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/transaction/blockchain/getLogs.ts b/src/server/routes/transaction/blockchain/getLogs.ts index f3a68da2e..5a4fc8008 100644 --- a/src/server/routes/transaction/blockchain/getLogs.ts +++ b/src/server/routes/transaction/blockchain/getLogs.ts @@ -1,15 +1,15 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { AbiEvent } from "abitype"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import superjson from "superjson"; import { + type Hex, eth_getTransactionReceipt, getContract, getRpcClient, parseEventLogs, prepareEvent, - type Hex, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { TransactionDB } from "../../../../db/transactions/db"; diff --git a/src/server/routes/transaction/blockchain/getReceipt.ts b/src/server/routes/transaction/blockchain/getReceipt.ts index 13cfd7786..570f21f69 100644 --- a/src/server/routes/transaction/blockchain/getReceipt.ts +++ b/src/server/routes/transaction/blockchain/getReceipt.ts @@ -1,11 +1,11 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { + type Hex, eth_getTransactionReceipt, getRpcClient, toHex, - type Hex, } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { TransactionReceipt } from "viem"; diff --git a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts index 76c8c43a0..3cae5bc43 100644 --- a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts +++ b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { env } from "../../../../utils/env"; @@ -104,7 +104,7 @@ export async function getUserOpReceipt(fastify: FastifyInstance) { reply.status(StatusCodes.OK).send({ result: json.result, }); - } catch (e) { + } catch { throw createCustomError( "Unable to get receipt.", StatusCodes.INTERNAL_SERVER_ERROR, diff --git a/src/server/routes/transaction/blockchain/sendSignedTx.ts b/src/server/routes/transaction/blockchain/sendSignedTx.ts index 5fc53a188..56f3ce58c 100644 --- a/src/server/routes/transaction/blockchain/sendSignedTx.ts +++ b/src/server/routes/transaction/blockchain/sendSignedTx.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_sendRawTransaction, getRpcClient, isHex } from "thirdweb"; diff --git a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts index f5b3b28a6..b2e143215 100644 --- a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts +++ b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { Value } from "@sinclair/typebox/value"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; @@ -9,6 +9,7 @@ import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const UserOp = Type.Object({ sender: Type.String(), nonce: Type.String(), diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index d9b704383..f521f2250 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; @@ -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/getAll.ts b/src/server/routes/transaction/getAll.ts index d8c023167..43ea0eb9b 100644 --- a/src/server/routes/transaction/getAll.ts +++ b/src/server/routes/transaction/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/transaction/getAllDeployedContracts.ts b/src/server/routes/transaction/getAllDeployedContracts.ts index 4bcd88a61..dedf69ce2 100644 --- a/src/server/routes/transaction/getAllDeployedContracts.ts +++ b/src/server/routes/transaction/getAllDeployedContracts.ts @@ -1,5 +1,5 @@ -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 { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/retry-failed.ts b/src/server/routes/transaction/retry-failed.ts index 0227f2ca3..67f78d5bf 100644 --- a/src/server/routes/transaction/retry-failed.ts +++ b/src/server/routes/transaction/retry-failed.ts @@ -1,5 +1,5 @@ -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 { eth_getTransactionReceipt, getRpcClient } from "thirdweb"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/transaction/retry.ts b/src/server/routes/transaction/retry.ts index c8716e2dd..d968bb879 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 type { 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 a5c9c1b95..63a57b55b 100644 --- a/src/server/routes/transaction/status.ts +++ b/src/server/routes/transaction/status.ts @@ -1,6 +1,6 @@ -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"; @@ -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/transaction/syncRetry.ts b/src/server/routes/transaction/syncRetry.ts index 7185c2802..b1288b5e2 100644 --- a/src/server/routes/transaction/syncRetry.ts +++ b/src/server/routes/transaction/syncRetry.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { toSerializableTransaction } from "thirdweb"; diff --git a/src/server/routes/webhooks/create.ts b/src/server/routes/webhooks/create.ts index a1cc44b32..0cf53e97b 100644 --- a/src/server/routes/webhooks/create.ts +++ b/src/server/routes/webhooks/create.ts @@ -1,5 +1,5 @@ -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"; diff --git a/src/server/routes/webhooks/events.ts b/src/server/routes/webhooks/events.ts index 1e621e771..afb43f390 100644 --- a/src/server/routes/webhooks/events.ts +++ b/src/server/routes/webhooks/events.ts @@ -1,5 +1,5 @@ -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 { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/webhooks/getAll.ts b/src/server/routes/webhooks/getAll.ts index 9e22617f4..a73cb0f19 100644 --- a/src/server/routes/webhooks/getAll.ts +++ b/src/server/routes/webhooks/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAllWebhooks } from "../../../db/webhooks/getAllWebhooks"; diff --git a/src/server/routes/webhooks/revoke.ts b/src/server/routes/webhooks/revoke.ts index d6725c6ba..c06d86eab 100644 --- a/src/server/routes/webhooks/revoke.ts +++ b/src/server/routes/webhooks/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getWebhook } from "../../../db/webhooks/getWebhook"; diff --git a/src/server/routes/webhooks/test.ts b/src/server/routes/webhooks/test.ts index 68bc341c6..196939b66 100644 --- a/src/server/routes/webhooks/test.ts +++ b/src/server/routes/webhooks/test.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getWebhook } from "../../../db/webhooks/getWebhook"; diff --git a/src/server/schemas/contract/index.ts b/src/server/schemas/contract/index.ts index ed27ac8e6..89e3739f4 100644 --- a/src/server/schemas/contract/index.ts +++ b/src/server/schemas/contract/index.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema } from "../address"; import type { contractSchemaTypes } from "../sharedApiSchemas"; diff --git a/src/server/schemas/contractSubscription.ts b/src/server/schemas/contractSubscription.ts index fc7939f72..75aad7485 100644 --- a/src/server/schemas/contractSubscription.ts +++ b/src/server/schemas/contractSubscription.ts @@ -1,5 +1,5 @@ import type { ContractSubscriptions, Webhooks } from "@prisma/client"; -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema } from "./address"; import { WebhookSchema, toWebhookSchema } from "./webhook"; 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/eventLog.ts b/src/server/schemas/eventLog.ts index bf3f6a9d8..e51fe633f 100644 --- a/src/server/schemas/eventLog.ts +++ b/src/server/schemas/eventLog.ts @@ -1,5 +1,5 @@ import type { ContractEventLogs } from "@prisma/client"; -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema, TransactionHashSchema } from "./address"; export const eventLogSchema = Type.Object({ diff --git a/src/server/schemas/keypairs.ts b/src/server/schemas/keypairs.ts index 31a3a7bc7..5e0a85bc3 100644 --- a/src/server/schemas/keypairs.ts +++ b/src/server/schemas/keypairs.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/server/schemas/marketplaceV3/directListing/index.ts b/src/server/schemas/marketplaceV3/directListing/index.ts index 317b4c4de..630481abd 100644 --- a/src/server/schemas/marketplaceV3/directListing/index.ts +++ b/src/server/schemas/marketplaceV3/directListing/index.ts @@ -82,12 +82,12 @@ export const directListingV3OutputSchema = Type.Object({ asset: Type.Optional(nftMetadataSchema), status: Type.Optional( Type.Union([ - Type.Literal(Status.UNSET), - Type.Literal(Status.Created), - Type.Literal(Status.Completed), - Type.Literal(Status.Cancelled), - Type.Literal(Status.Active), - Type.Literal(Status.Expired), + Type.Literal(Status.UNSET, { description: "UNSET" }), + Type.Literal(Status.Created, { description: "Created" }), + Type.Literal(Status.Completed, { description: "Completed" }), + Type.Literal(Status.Cancelled, { description: "Cancelled" }), + Type.Literal(Status.Active, { description: "Active" }), + Type.Literal(Status.Expired, { description: "Expired" }), ]), ), startTimeInSeconds: Type.Optional( diff --git a/src/server/schemas/marketplaceV3/englishAuction/index.ts b/src/server/schemas/marketplaceV3/englishAuction/index.ts index e2298d686..87c79bfac 100644 --- a/src/server/schemas/marketplaceV3/englishAuction/index.ts +++ b/src/server/schemas/marketplaceV3/englishAuction/index.ts @@ -119,12 +119,12 @@ export const englishAuctionOutputSchema = Type.Object({ asset: Type.Optional(nftMetadataSchema), status: Type.Optional( Type.Union([ - Type.Literal(Status.UNSET), - Type.Literal(Status.Created), - Type.Literal(Status.Completed), - Type.Literal(Status.Cancelled), - Type.Literal(Status.Active), - Type.Literal(Status.Expired), + Type.Literal(Status.UNSET, { description: "UNSET" }), + Type.Literal(Status.Created, { description: "Created" }), + Type.Literal(Status.Completed, { description: "Completed" }), + Type.Literal(Status.Cancelled, { description: "Cancelled" }), + Type.Literal(Status.Active, { description: "Active" }), + Type.Literal(Status.Expired, { description: "Expired" }), ]), ), }); diff --git a/src/server/schemas/marketplaceV3/offer/index.ts b/src/server/schemas/marketplaceV3/offer/index.ts index 7454cad3b..254b26ebc 100644 --- a/src/server/schemas/marketplaceV3/offer/index.ts +++ b/src/server/schemas/marketplaceV3/offer/index.ts @@ -72,12 +72,12 @@ export const OfferV3OutputSchema = Type.Object({ ), status: Type.Optional( Type.Union([ - Type.Literal(Status.UNSET), - Type.Literal(Status.Created), - Type.Literal(Status.Completed), - Type.Literal(Status.Cancelled), - Type.Literal(Status.Active), - Type.Literal(Status.Expired), + Type.Literal(Status.UNSET, { description: "UNSET" }), + Type.Literal(Status.Created, { description: "Created" }), + Type.Literal(Status.Completed, { description: "Completed" }), + Type.Literal(Status.Cancelled, { description: "Cancelled" }), + Type.Literal(Status.Active, { description: "Active" }), + Type.Literal(Status.Expired, { description: "Expired" }), ]), ), }); 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/sharedApiSchemas.ts b/src/server/schemas/sharedApiSchemas.ts index 61053cb75..0859a940c 100644 --- a/src/server/schemas/sharedApiSchemas.ts +++ b/src/server/schemas/sharedApiSchemas.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { PREBUILT_CONTRACTS_MAP } from "@thirdweb-dev/sdk"; import type { RouteGenericInterface } from "fastify"; import type { FastifySchema } from "fastify/types/schema"; diff --git a/src/server/schemas/transaction/index.ts b/src/server/schemas/transaction/index.ts index 0db9dae34..ccd484127 100644 --- a/src/server/schemas/transaction/index.ts +++ b/src/server/schemas/transaction/index.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { Hex } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { AnyTransaction } from "../../../utils/transaction/types"; diff --git a/src/server/schemas/transactionReceipt.ts b/src/server/schemas/transactionReceipt.ts index 5d10a8e16..72d3e3186 100644 --- a/src/server/schemas/transactionReceipt.ts +++ b/src/server/schemas/transactionReceipt.ts @@ -1,5 +1,5 @@ import type { ContractTransactionReceipts } from "@prisma/client"; -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema, TransactionHashSchema } from "./address"; export const transactionReceiptSchema = Type.Object({ diff --git a/src/server/schemas/wallet/index.ts b/src/server/schemas/wallet/index.ts index 4f5a87c9e..201a881e3 100644 --- a/src/server/schemas/wallet/index.ts +++ b/src/server/schemas/wallet/index.ts @@ -1,5 +1,5 @@ import { Type } from "@sinclair/typebox"; -import { getAddress, type Address } from "thirdweb"; +import { type Address, getAddress } from "thirdweb"; import { env } from "../../../utils/env"; import { badAddressError } from "../../middleware/error"; import { AddressSchema } from "../address"; diff --git a/src/server/schemas/webhook.ts b/src/server/schemas/webhook.ts index 3e7fbc36d..1fe125a8d 100644 --- a/src/server/schemas/webhook.ts +++ b/src/server/schemas/webhook.ts @@ -1,5 +1,5 @@ import type { Webhooks } from "@prisma/client"; -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; export const WebhookSchema = Type.Object({ id: Type.Integer(), 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/chain.ts b/src/server/utils/chain.ts index 5ea5741d6..c2a3c9b14 100644 --- a/src/server/utils/chain.ts +++ b/src/server/utils/chain.ts @@ -17,7 +17,9 @@ export const getChainIdFromChain = async (input: string): Promise => { if (chainV4.status !== "deprecated") { return chainV4.chainId; } - } catch {} + } catch { + /* empty */ + } throw badChainError(input); }; diff --git a/src/server/utils/marketplaceV3.ts b/src/server/utils/marketplaceV3.ts index b880c9e4c..19a61a445 100644 --- a/src/server/utils/marketplaceV3.ts +++ b/src/server/utils/marketplaceV3.ts @@ -1,4 +1,8 @@ -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..d3906a806 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"; export const writeOpenApiToFile = (server: FastifyInstance) => { try { diff --git a/src/server/utils/storage/localStorage.ts b/src/server/utils/storage/localStorage.ts index 8c5557faa..c8ae69367 100644 --- a/src/server/utils/storage/localStorage.ts +++ b/src/server/utils/storage/localStorage.ts @@ -1,5 +1,5 @@ -import type { AsyncStorage } from "@thirdweb-dev/wallets"; import fs from "node:fs"; +import type { AsyncStorage } from "@thirdweb-dev/wallets"; import { prisma } from "../../../db/client"; import { WalletType } from "../../../schema/wallet"; import { logger } from "../../../utils/logger"; diff --git a/src/server/utils/validator.ts b/src/server/utils/validator.ts index cde9192b2..15e525cc8 100644 --- a/src/server/utils/validator.ts +++ b/src/server/utils/validator.ts @@ -6,8 +6,8 @@ import type { } from "../schemas/erc20"; import type { ercNFTResponseType, - signature1155InputSchema, signature721InputSchema, + signature1155InputSchema, } from "../schemas/nft"; const timestampValidator = (value: number | string | undefined): boolean => { diff --git a/src/server/utils/wallets/createAwsKmsWallet.ts b/src/server/utils/wallets/createAwsKmsWallet.ts index 1d4b75b50..e6d3c85e5 100644 --- a/src/server/utils/wallets/createAwsKmsWallet.ts +++ b/src/server/utils/wallets/createAwsKmsWallet.ts @@ -1,8 +1,8 @@ import { CreateKeyCommand, KMSClient } from "@aws-sdk/client-kms"; import { + type AwsKmsWalletParams, FetchAwsKmsWalletParamsError, fetchAwsKmsWalletParams, - type AwsKmsWalletParams, } from "./fetchAwsKmsWalletParams"; import { importAwsKmsWallet } from "./importAwsKmsWallet"; diff --git a/src/server/utils/wallets/createGcpKmsWallet.ts b/src/server/utils/wallets/createGcpKmsWallet.ts index 2b4b47201..f71d82c3b 100644 --- a/src/server/utils/wallets/createGcpKmsWallet.ts +++ b/src/server/utils/wallets/createGcpKmsWallet.ts @@ -4,8 +4,8 @@ import { WalletType } from "../../../schema/wallet"; import { thirdwebClient } from "../../../utils/sdk"; import { FetchGcpKmsWalletParamsError, - fetchGcpKmsWalletParams, type GcpKmsWalletParams, + fetchGcpKmsWalletParams, } from "./fetchGcpKmsWalletParams"; import { getGcpKmsResourcePath } from "./gcpKmsResourcePath"; import { getGcpKmsAccount } from "./getGcpKmsAccount"; diff --git a/src/server/utils/wallets/createSmartWallet.ts b/src/server/utils/wallets/createSmartWallet.ts index 5859a430a..32e0170ac 100644 --- a/src/server/utils/wallets/createSmartWallet.ts +++ b/src/server/utils/wallets/createSmartWallet.ts @@ -1,16 +1,16 @@ -import { defineChain, type Address, type Chain } from "thirdweb"; -import { smartWallet, type Account } from "thirdweb/wallets"; +import { type Address, type Chain, defineChain } from "thirdweb"; +import { type Account, smartWallet } from "thirdweb/wallets"; import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; import { WalletType } from "../../../schema/wallet"; import { thirdwebClient } from "../../../utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; import { - createAwsKmsKey, type CreateAwsKmsWalletParams, + createAwsKmsKey, } from "./createAwsKmsWallet"; import { - createGcpKmsKey, type CreateGcpKmsWalletParams, + createGcpKmsKey, } from "./createGcpKmsWallet"; import { generateLocalWallet } from "./createLocalWallet"; import { getAwsKmsAccount } from "./getAwsKmsAccount"; diff --git a/src/server/utils/wallets/getAwsKmsAccount.ts b/src/server/utils/wallets/getAwsKmsAccount.ts index 91e99104d..50a499856 100644 --- a/src/server/utils/wallets/getAwsKmsAccount.ts +++ b/src/server/utils/wallets/getAwsKmsAccount.ts @@ -2,10 +2,10 @@ import type { KMSClientConfig } from "@aws-sdk/client-kms"; import { KmsSigner } from "aws-kms-signer"; import type { Hex, ThirdwebClient } from "thirdweb"; import { + type Address, eth_sendRawTransaction, getRpcClient, keccak256, - type Address, } from "thirdweb"; import { serializeTransaction } from "thirdweb/transaction"; import { hashMessage } from "thirdweb/utils"; diff --git a/src/server/utils/wallets/getLocalWallet.ts b/src/server/utils/wallets/getLocalWallet.ts index 0f4456423..5cf0ac3c9 100644 --- a/src/server/utils/wallets/getLocalWallet.ts +++ b/src/server/utils/wallets/getLocalWallet.ts @@ -2,7 +2,7 @@ import { LocalWallet } from "@thirdweb-dev/wallets"; import { Wallet } from "ethers"; import type { Address } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; -import { privateKeyToAccount, type Account } from "thirdweb/wallets"; +import { type Account, privateKeyToAccount } from "thirdweb/wallets"; import { getWalletDetails } from "../../../db/wallets/getWalletDetails"; import { getChain } from "../../../utils/chain"; import { env } from "../../../utils/env"; diff --git a/src/server/utils/wallets/getSmartWallet.ts b/src/server/utils/wallets/getSmartWallet.ts index 59ab4d885..686e7f6a1 100644 --- a/src/server/utils/wallets/getSmartWallet.ts +++ b/src/server/utils/wallets/getSmartWallet.ts @@ -1,4 +1,4 @@ -import { SmartWallet, type EVMWallet } from "@thirdweb-dev/wallets"; +import { type EVMWallet, SmartWallet } from "@thirdweb-dev/wallets"; import { getContract } from "../../../utils/cache/getContract"; import { env } from "../../../utils/env"; import { redis } from "../../../utils/redis/redis"; @@ -31,7 +31,9 @@ export const getSmartWallet = async ({ resolvedFactoryAddress = (await redis.get(`account-factory:${accountAddress.toLowerCase()}`)) ?? undefined; - } catch {} + } catch { + /* empty */ + } } if (!resolvedFactoryAddress) { @@ -41,7 +43,9 @@ export const getSmartWallet = async ({ contractAddress: accountAddress, }); resolvedFactoryAddress = await contract.call("factory"); - } catch {} + } catch { + /* empty */ + } } if (!resolvedFactoryAddress) { diff --git a/src/server/utils/websocket.ts b/src/server/utils/websocket.ts index 4e68a198d..331770988 100644 --- a/src/server/utils/websocket.ts +++ b/src/server/utils/websocket.ts @@ -1,16 +1,16 @@ -import { SocketStream } from "@fastify/websocket"; -import { Static } from "@sinclair/typebox"; -import { FastifyRequest } from "fastify"; +import type { SocketStream } from "@fastify/websocket"; +import type { Static } from "@sinclair/typebox"; +import type { FastifyRequest } from "fastify"; import { logger } from "../../utils/logger"; -import { TransactionSchema } from "../schemas/transaction"; -import { UserSubscription, subscriptionsData } from "../schemas/websocket"; +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; export const findWSConnectionInSharedState = async ( connection: SocketStream, - request: FastifyRequest, + _request: FastifyRequest, ): Promise => { const index = subscriptionsData.findIndex( (sub) => sub.socket === connection.socket, diff --git a/src/tests/auth.test.ts b/src/tests/auth.test.ts index 8e6e774e9..5150050af 100644 --- a/src/tests/auth.test.ts +++ b/src/tests/auth.test.ts @@ -1,7 +1,7 @@ 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"; @@ -75,7 +75,7 @@ describe("Static paths", () => { method: "GET", url: path, headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -97,7 +97,7 @@ describe("Relayer endpoints", () => { method: "POST", url: "/relayer/be369f95-7bef-4e29-a016-3146fa394eb1", headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -117,7 +117,7 @@ describe("Relayer endpoints", () => { method: "POST", url: path, headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -155,7 +155,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -188,7 +188,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: { socket: mockSocket }, }; @@ -226,7 +226,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: { socket: mockSocket }, }; @@ -249,7 +249,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: { socket: mockSocket }, }; @@ -275,6 +275,7 @@ describe("Websocket requests", () => { session: { permissions: Permission.Admin }, }); + // eslint-disable-next-line @typescript-eslint/no-unused-vars const mockSocket = { write: vi.fn(), destroy: vi.fn(), @@ -292,7 +293,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -336,7 +337,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -369,7 +370,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -401,7 +402,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -424,7 +425,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -464,7 +465,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -521,7 +522,7 @@ C0cP9UNh7FQsLQ/l2BcOH8+G2xvh+8tjtQ== method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -555,7 +556,7 @@ C0cP9UNh7FQsLQ/l2BcOH8+G2xvh+8tjtQ== method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -583,7 +584,7 @@ C0cP9UNh7FQsLQ/l2BcOH8+G2xvh+8tjtQ== method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -615,7 +616,7 @@ AwEHoUQDQgAE74w9+HXi/PCQZTu2AS4titehOFopNSrfqlFnFbtglPuwNB2ke53p method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -658,7 +659,7 @@ AwEHoUQDQgAE74w9+HXi/PCQZTu2AS4titehOFopNSrfqlFnFbtglPuwNB2ke53p method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -694,7 +695,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -718,7 +719,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -751,7 +752,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -771,7 +772,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -788,7 +789,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -809,7 +810,7 @@ describe("thirdweb secret key", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: "Bearer my-thirdweb-secret-key" }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -823,7 +824,7 @@ describe("thirdweb secret key", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: "Bearer my-thirdweb-secret-key" }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -888,7 +889,7 @@ describe("auth webhooks", () => { method: "POST", url: "/backend-wallets/get-all", headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -937,7 +938,7 @@ describe("auth webhooks", () => { method: "POST", url: "/backend-wallets/get-all", headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -952,7 +953,7 @@ describe("auth webhooks", () => { method: "POST", url: "/backend-wallets/get-all", headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; diff --git a/src/tests/chain.test.ts b/src/tests/chain.test.ts index 4a3684a6c..20fa1f585 100644 --- a/src/tests/chain.test.ts +++ b/src/tests/chain.test.ts @@ -22,7 +22,7 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from chainOverrides if it exists by slug", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({ chainOverrides: JSON.stringify([ { @@ -40,7 +40,7 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from chainOverrides if it exists by slug, case-insensitive", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({ chainOverrides: JSON.stringify([ { @@ -58,7 +58,7 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from chainOverrides if it exists", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({ chainOverrides: JSON.stringify([ { @@ -76,7 +76,7 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from getChainByChainIdAsync if chain is a valid numeric string", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetChainByChainIdAsync.mockResolvedValueOnce({ name: "Polygon", chainId: 137, @@ -90,9 +90,9 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from getChainBySlugAsync if chain is a valid string", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({}); - // @ts-ignore + // @ts-expect-error expected mockGetChainBySlugAsync.mockResolvedValueOnce({ name: "Polygon", chainId: 137, @@ -106,7 +106,7 @@ describe("getChainIdFromChain", () => { }); it("should throw an error for an invalid chain", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({}); await expect(getChainIdFromChain("not_a_real_chain")).rejects.toEqual({ diff --git a/src/tests/cors.test.ts b/src/tests/cors.test.ts index 321709953..cd890753d 100644 --- a/src/tests/cors.test.ts +++ b/src/tests/cors.test.ts @@ -3,10 +3,10 @@ import { sanitizeOrigin } from "../server/middleware/cors/cors"; describe("sanitizeOrigin", () => { it("with leading and trailing slashes", () => { - expect(sanitizeOrigin("/foobar/")).toEqual(RegExp("foobar")); + expect(sanitizeOrigin("/foobar/")).toEqual(/foobar/); }); it("with leading wildcard", () => { - expect(sanitizeOrigin("*.foobar.com")).toEqual(RegExp(".*.foobar.com")); + expect(sanitizeOrigin("*.foobar.com")).toEqual(/.*.foobar.com/); }); it("with thirdweb domains", () => { expect(sanitizeOrigin("https://thirdweb-preview.com")).toEqual( diff --git a/src/tests/shared/chain.ts b/src/tests/shared/chain.ts index aed41dbdc..a475d2179 100644 --- a/src/tests/shared/chain.ts +++ b/src/tests/shared/chain.ts @@ -1,6 +1,6 @@ import { defineChain } from "thirdweb"; import { anvil } from "thirdweb/chains"; -import { createTestClient, http } from "viem"; +import { http, createTestClient } from "viem"; export const ANVIL_CHAIN = defineChain({ ...anvil, diff --git a/src/tests/swr.test.ts b/src/tests/swr.test.ts index ce709ddf3..599fe62cf 100644 --- a/src/tests/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 "../lib/cache/swr"; +import { type SWRCache, createSWRCache } from "../lib/cache/swr"; describe("SWRCache", () => { let cache: SWRCache; diff --git a/src/utils/account.ts b/src/utils/account.ts index 0c8373f7d..57d62a912 100644 --- a/src/utils/account.ts +++ b/src/utils/account.ts @@ -1,10 +1,10 @@ import LRUMap from "mnemonist/lru-map"; -import { getAddress, type Address, type Chain } from "thirdweb"; +import { type Address, type Chain, getAddress } from "thirdweb"; import type { Account } from "thirdweb/wallets"; import { + type ParsedWalletDetails, getWalletDetails, isSmartBackendWallet, - type ParsedWalletDetails, } from "../db/wallets/getWalletDetails"; import { WalletType } from "../schema/wallet"; import { splitAwsKmsArn } from "../server/utils/wallets/awsKmsArn"; diff --git a/src/utils/block.ts b/src/utils/block.ts index 9d7f61f20..736b60097 100644 --- a/src/utils/block.ts +++ b/src/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 { const cached = await redis.get(key); if (cached) { return BigInt(cached); diff --git a/src/utils/cache/clearCache.ts b/src/utils/cache/clearCache.ts index 870561b26..a682bb997 100644 --- a/src/utils/cache/clearCache.ts +++ b/src/utils/cache/clearCache.ts @@ -7,7 +7,7 @@ import { webhookCache } from "./getWebhook"; 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/utils/cache/getContract.ts b/src/utils/cache/getContract.ts index 4ace9a679..6022adcca 100644 --- a/src/utils/cache/getContract.ts +++ b/src/utils/cache/getContract.ts @@ -1,9 +1,10 @@ -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 { getSdk } from "./getSdk"; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const abiArraySchema = Type.Array(abiSchema); interface GetContractParams { diff --git a/src/utils/cache/getSmartWalletV5.ts b/src/utils/cache/getSmartWalletV5.ts index 7ab01f275..82e1a21ca 100644 --- a/src/utils/cache/getSmartWalletV5.ts +++ b/src/utils/cache/getSmartWalletV5.ts @@ -1,6 +1,6 @@ import LRUMap from "mnemonist/lru-map"; -import { getContract, readContract, type Address, type Chain } from "thirdweb"; -import { smartWallet, type Account } from "thirdweb/wallets"; +import { type Address, type Chain, getContract, readContract } from "thirdweb"; +import { type Account, smartWallet } from "thirdweb/wallets"; import { getAccount } from "../account"; import { thirdwebClient } from "../sdk"; diff --git a/src/utils/cache/getWallet.ts b/src/utils/cache/getWallet.ts index 6b078594b..230ba1782 100644 --- a/src/utils/cache/getWallet.ts +++ b/src/utils/cache/getWallet.ts @@ -3,9 +3,9 @@ import { AwsKmsWallet } from "@thirdweb-dev/wallets/evm/wallets/aws-kms"; import { GcpKmsWallet } from "@thirdweb-dev/wallets/evm/wallets/gcp-kms"; import LRUMap from "mnemonist/lru-map"; import { + type ParsedWalletDetails, WalletDetailsError, getWalletDetails, - type ParsedWalletDetails, } from "../../db/wallets/getWalletDetails"; import type { PrismaTransaction } from "../../schema/prisma"; import { WalletType } from "../../schema/wallet"; diff --git a/src/utils/chain.ts b/src/utils/chain.ts index 0b15e27cd..bc9ccd586 100644 --- a/src/utils/chain.ts +++ b/src/utils/chain.ts @@ -1,4 +1,4 @@ -import { defineChain, type Chain } from "thirdweb"; +import { type Chain, defineChain } from "thirdweb"; import { getConfig } from "./cache/getConfig"; /** diff --git a/src/utils/cron/clearCacheCron.ts b/src/utils/cron/clearCacheCron.ts index c6bf0f0b3..217aa39ce 100644 --- a/src/utils/cron/clearCacheCron.ts +++ b/src/utils/cron/clearCacheCron.ts @@ -1,7 +1,7 @@ import cron from "node-cron"; import { clearCache } from "../cache/clearCache"; import { getConfig } from "../cache/getConfig"; -import { env } from "../env"; +import type { env } from "../env"; let task: cron.ScheduledTask; export const clearCacheCron = async ( diff --git a/src/utils/cron/isValidCron.ts b/src/utils/cron/isValidCron.ts index f0ea16ccf..81e672a88 100644 --- a/src/utils/cron/isValidCron.ts +++ b/src/utils/cron/isValidCron.ts @@ -5,7 +5,7 @@ import { createCustomError } from "../../server/middleware/error"; export const isValidCron = (input: string): boolean => { try { cronParser.parseExpression(input); - } catch (error) { + } catch { throw createCustomError( "Invalid cron expression. Please check the cron expression.", StatusCodes.BAD_REQUEST, @@ -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/utils/crypto.ts b/src/utils/crypto.ts index 7b9052dd4..3b5c89929 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -14,7 +14,7 @@ export const isWellFormedPublicKey = (key: string) => { try { crypto.createPublicKey(key); return true; - } catch (e) { + } catch { return false; } }; diff --git a/src/utils/transaction/cancelTransaction.ts b/src/utils/transaction/cancelTransaction.ts index 29ee5fc66..b2de0f7d0 100644 --- a/src/utils/transaction/cancelTransaction.ts +++ b/src/utils/transaction/cancelTransaction.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 "../primitiveTypes"; @@ -41,8 +41,7 @@ export const sendCancellationTransaction = async ( } const account = await getAccount({ chainId, from }); - const { transactionHash } = await account.sendTransaction( - populatedTransaction, - ); + const { transactionHash } = + await account.sendTransaction(populatedTransaction); return transactionHash; }; diff --git a/src/utils/transaction/insertTransaction.ts b/src/utils/transaction/insertTransaction.ts index fe79018fb..259d98de9 100644 --- a/src/utils/transaction/insertTransaction.ts +++ b/src/utils/transaction/insertTransaction.ts @@ -1,10 +1,10 @@ -import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; +import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../db/transactions/db"; import { + type ParsedWalletDetails, getWalletDetails, isSmartBackendWallet, - type ParsedWalletDetails, } from "../../db/wallets/getWalletDetails"; import { doesChainSupportService } from "../../lib/chain/chain-capabilities"; import { createCustomError } from "../../server/middleware/error"; diff --git a/src/utils/transaction/queueTransation.ts b/src/utils/transaction/queueTransation.ts index cdaf2245d..833af51e4 100644 --- a/src/utils/transaction/queueTransation.ts +++ b/src/utils/transaction/queueTransation.ts @@ -1,10 +1,10 @@ import type { Static } from "@sinclair/typebox"; import { StatusCodes } from "http-status-codes"; import { - encode, type Address, type Hex, type PreparedTransaction, + encode, } from "thirdweb"; import { resolvePromisedValue } from "thirdweb/utils"; import { createCustomError } from "../../server/middleware/error"; diff --git a/src/utils/transaction/simulateQueuedTransaction.ts b/src/utils/transaction/simulateQueuedTransaction.ts index 5b94db96f..8015b3c20 100644 --- a/src/utils/transaction/simulateQueuedTransaction.ts +++ b/src/utils/transaction/simulateQueuedTransaction.ts @@ -1,7 +1,7 @@ import { + type PreparedTransaction, prepareTransaction, simulateTransaction, - type PreparedTransaction, } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { Account } from "thirdweb/wallets"; diff --git a/src/utils/usage.ts b/src/utils/usage.ts index 5d218b787..9ea6ed83a 100644 --- a/src/utils/usage.ts +++ b/src/utils/usage.ts @@ -1,11 +1,11 @@ -import { Static } from "@sinclair/typebox"; -import { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; -import { FastifyInstance } from "fastify"; -import { Address, Hex } from "thirdweb"; +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/open-api"; -import { contractParamSchema } from "../server/schemas/sharedApiSchemas"; -import { walletWithAddressParamSchema } from "../server/schemas/wallet"; +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"; diff --git a/src/utils/webhook.ts b/src/utils/webhook.ts index f8597e9ca..ef9e17643 100644 --- a/src/utils/webhook.ts +++ b/src/utils/webhook.ts @@ -1,5 +1,5 @@ -import type { Webhooks } from "@prisma/client"; import crypto from "node:crypto"; +import type { Webhooks } from "@prisma/client"; import { prettifyError } from "./error"; export const generateSignature = ( diff --git a/src/worker/listeners/configListener.ts b/src/worker/listeners/configListener.ts index 48213c731..febdac002 100644 --- a/src/worker/listeners/configListener.ts +++ b/src/worker/listeners/configListener.ts @@ -18,7 +18,7 @@ export const newConfigurationListener = async (): Promise => { // 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); }, @@ -69,7 +69,7 @@ export const updatedConfigurationListener = async (): Promise => { // 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", diff --git a/src/worker/listeners/webhookListener.ts b/src/worker/listeners/webhookListener.ts index 2ab19ba2f..025db9ae6 100644 --- a/src/worker/listeners/webhookListener.ts +++ b/src/worker/listeners/webhookListener.ts @@ -16,7 +16,7 @@ export const newWebhooksListener = async (): Promise => { // 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", @@ -72,7 +72,7 @@ export const updatedWebhooksListener = async (): Promise => { // 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", diff --git a/src/worker/queues/processEventLogsQueue.ts b/src/worker/queues/processEventLogsQueue.ts index 1c32ad36f..edfd42ec9 100644 --- a/src/worker/queues/processEventLogsQueue.ts +++ b/src/worker/queues/processEventLogsQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import SuperJSON from "superjson"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { getConfig } from "../../utils/cache/getConfig"; import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; @@ -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/processTransactionReceiptsQueue.ts b/src/worker/queues/processTransactionReceiptsQueue.ts index 0f595e73f..94c2959ad 100644 --- a/src/worker/queues/processTransactionReceiptsQueue.ts +++ b/src/worker/queues/processTransactionReceiptsQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { getConfig } from "../../utils/cache/getConfig"; import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; @@ -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/queues/sendTransactionQueue.ts b/src/worker/queues/sendTransactionQueue.ts index ba93068b8..bdd1c22b8 100644 --- a/src/worker/queues/sendTransactionQueue.ts +++ b/src/worker/queues/sendTransactionQueue.ts @@ -32,7 +32,7 @@ export class SendTransactionQueue { static remove = async (data: SendTransactionData) => { try { await this.q.remove(this.jobId(data)); - } catch (e) { + } catch { // Job is currently running. } }; diff --git a/src/worker/queues/sendWebhookQueue.ts b/src/worker/queues/sendWebhookQueue.ts index 1861e4375..4a30be5a0 100644 --- a/src/worker/queues/sendWebhookQueue.ts +++ b/src/worker/queues/sendWebhookQueue.ts @@ -6,8 +6,8 @@ import type { import { Queue } from "bullmq"; import SuperJSON from "superjson"; import { - WebhooksEventTypes, type BackendWalletBalanceWebhookParams, + WebhooksEventTypes, } from "../../schema/webhooks"; import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; import { logger } from "../../utils/logger"; diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancelRecycledNoncesWorker.ts index 6b8b6a125..5acb8f9f5 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancelRecycledNoncesWorker.ts @@ -1,5 +1,5 @@ -import { Job, Processor, Worker } from "bullmq"; -import { Address } from "thirdweb"; +import { type Job, type Processor, Worker } from "bullmq"; +import type { Address } from "thirdweb"; import { recycleNonce } from "../../db/wallets/walletNonce"; import { isNonceAlreadyUsedError } from "../../utils/error"; import { logger } from "../../utils/logger"; @@ -66,9 +66,9 @@ const handler: Processor = async (job: Job) => { }; const fromRecycledNoncesKey = (key: string) => { - const [_, chainId, walletAddress] = key.split(":"); + 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/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chainIndexer.ts index a7fbcc304..8746a0dd6 100644 --- a/src/worker/tasks/chainIndexer.ts +++ b/src/worker/tasks/chainIndexer.ts @@ -1,8 +1,8 @@ import { + type Address, eth_blockNumber, eth_getBlockByNumber, getRpcClient, - type Address, } from "thirdweb"; import { getBlockForIndexing } from "../../db/chainIndexers/getChainIndexer"; import { upsertChainIndexer } from "../../db/chainIndexers/upsertChainIndexer"; diff --git a/src/worker/tasks/migratePostgresTransactionsWorker.ts b/src/worker/tasks/migratePostgresTransactionsWorker.ts index 7547d9b75..6b6a7e166 100644 --- a/src/worker/tasks/migratePostgresTransactionsWorker.ts +++ b/src/worker/tasks/migratePostgresTransactionsWorker.ts @@ -1,6 +1,6 @@ -import type { Transactions } from "@prisma/client"; -import { Worker, type Job, type Processor } from "bullmq"; import assert from "node:assert"; +import type { Transactions } from "@prisma/client"; +import { type Job, type Processor, Worker } from "bullmq"; import type { Hex } from "thirdweb"; import { getPrismaWithPostgresTx, prisma } from "../../db/client"; import { TransactionDB } from "../../db/transactions/db"; @@ -198,7 +198,7 @@ const toQueuedTransaction = (row: Transactions): QueuedTransaction => { resendCount: 0, isUserOp: !!row.accountAddress, - chainId: parseInt(row.chainId), + chainId: Number.parseInt(row.chainId), from: normalizeAddress(row.fromAddress), to: normalizeAddress(row.toAddress), value: row.value ? BigInt(row.value) : 0n, diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index bed88e803..ad2d1c06f 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -1,14 +1,14 @@ -import { Worker, type Job, type Processor } from "bullmq"; import assert from "node:assert"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { + type Address, 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"; @@ -34,8 +34,8 @@ import type { import { enqueueTransactionWebhook } from "../../utils/transaction/webhook"; import { reportUsage } from "../../utils/usage"; import { - MineTransactionQueue, type MineTransactionData, + MineTransactionQueue, } from "../queues/mineTransactionQueue"; import { SendTransactionQueue } from "../queues/sendTransactionQueue"; import { SendWebhookQueue } from "../queues/sendWebhookQueue"; diff --git a/src/worker/tasks/nonceHealthCheckWorker.ts b/src/worker/tasks/nonceHealthCheckWorker.ts index 4d528c0c8..a9093230b 100644 --- a/src/worker/tasks/nonceHealthCheckWorker.ts +++ b/src/worker/tasks/nonceHealthCheckWorker.ts @@ -1,5 +1,5 @@ -import { Worker, type Job, type Processor } from "bullmq"; -import { getAddress, type Address } from "thirdweb"; +import { type Job, type Processor, Worker } from "bullmq"; +import { type Address, getAddress } from "thirdweb"; import { getUsedBackendWallets, inspectNonce, @@ -50,7 +50,7 @@ const handler: Processor = async (_job: Job) => { await Promise.all( batch.map(async ({ chainId, walletAddress }) => { - const [_, isStuck, currentState] = await Promise.all([ + const [, isStuck, currentState] = await Promise.all([ updateNonceHistory(walletAddress, chainId), isQueueStuck(walletAddress, chainId), getCurrentNonceState(walletAddress, chainId), diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonceResyncWorker.ts index 9a0642250..2e446a0de 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -1,4 +1,4 @@ -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import { eth_getTransactionCount, getRpcClient } from "thirdweb"; import { inspectNonce, diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index b3ad7c5fa..0ed8301a0 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -1,18 +1,18 @@ import type { Prisma, Webhooks } from "@prisma/client"; import type { AbiEvent } from "abitype"; -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { - eth_getBlockByHash, - getContract, - getContractEvents, - getRpcClient, - prepareEvent, type Address, type Chain, type Hex, type PreparedEvent, type ThirdwebContract, + eth_getBlockByHash, + getContract, + getContractEvents, + getRpcClient, + prepareEvent, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { bulkInsertContractEventLogs } from "../../db/contractEventLogs/createContractEventLogs"; @@ -24,7 +24,7 @@ import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; import { thirdwebClient } from "../../utils/sdk"; import { - EnqueueProcessEventLogsData, + type EnqueueProcessEventLogsData, ProcessEventsLogQueue, } from "../queues/processEventLogsQueue"; import { logWorkerExceptions } from "../queues/queues"; @@ -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 { return now; } }), diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index d8cdb23ae..451ae74c6 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -1,17 +1,17 @@ import type { Prisma } from "@prisma/client"; import type { AbiEvent } from "abitype"; -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { + type Address, + type ThirdwebContract, eth_getBlockByNumber, eth_getTransactionReceipt, getContract, getRpcClient, - type Address, - type ThirdwebContract, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import { decodeFunctionData, type Abi, type Hash } from "viem"; +import { type Abi, type Hash, decodeFunctionData } from "viem"; import { bulkInsertContractTransactionReceipts } from "../../db/contractTransactionReceipts/createContractTransactionReceipts"; import { WebhooksEventTypes } from "../../schema/webhooks"; import { getChain } from "../../utils/chain"; @@ -20,8 +20,8 @@ import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; import { thirdwebClient } from "../../utils/sdk"; import { - ProcessTransactionReceiptsQueue, type EnqueueProcessTransactionReceiptsData, + ProcessTransactionReceiptsQueue, } from "../queues/processTransactionReceiptsQueue"; import { logWorkerExceptions } from "../queues/queues"; import { SendWebhookQueue } from "../queues/sendWebhookQueue"; diff --git a/src/worker/tasks/pruneTransactionsWorker.ts b/src/worker/tasks/pruneTransactionsWorker.ts index 9ba8a361a..54127de5b 100644 --- a/src/worker/tasks/pruneTransactionsWorker.ts +++ b/src/worker/tasks/pruneTransactionsWorker.ts @@ -1,4 +1,4 @@ -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import { TransactionDB } from "../../db/transactions/db"; import { pruneNonceMaps } from "../../db/wallets/nonceMap"; import { env } from "../../utils/env"; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 803de187b..c0c38ff5b 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -1,21 +1,21 @@ -import { Worker, type Job, type Processor } from "bullmq"; import assert from "node:assert"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { + type Hex, getAddress, 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 { + type UserOperation, bundleUserOp, createAndSignUserOp, - type UserOperation, } from "thirdweb/wallets/smart"; import { getContractAddress } from "viem"; import { TransactionDB } from "../../db/transactions/db"; @@ -54,8 +54,8 @@ import { reportUsage } from "../../utils/usage"; import { MineTransactionQueue } from "../queues/mineTransactionQueue"; import { logWorkerExceptions } from "../queues/queues"; import { - SendTransactionQueue, type SendTransactionData, + SendTransactionQueue, } from "../queues/sendTransactionQueue"; /** @@ -78,6 +78,7 @@ 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) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars const { errorMessage, ...omitted } = transaction; transaction = { ...omitted, diff --git a/src/worker/tasks/sendWebhookWorker.ts b/src/worker/tasks/sendWebhookWorker.ts index a8cf60c23..ff7143f1a 100644 --- a/src/worker/tasks/sendWebhookWorker.ts +++ b/src/worker/tasks/sendWebhookWorker.ts @@ -1,20 +1,20 @@ import type { Static } from "@sinclair/typebox"; -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { TransactionDB } from "../../db/transactions/db"; import { - WebhooksEventTypes, type BackendWalletBalanceWebhookParams, + WebhooksEventTypes, } from "../../schema/webhooks"; import { toEventLogSchema } from "../../server/schemas/eventLog"; import { - toTransactionSchema, type TransactionSchema, + toTransactionSchema, } 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 { type WebhookResponse, sendWebhookRequest } from "../../utils/webhook"; import { SendWebhookQueue, type WebhookJob } from "../queues/sendWebhookQueue"; const handler: Processor = async (job: Job) => { diff --git a/test/e2e/config.ts b/test/e2e/config.ts index 83cd7d067..75b2345f8 100644 --- a/test/e2e/config.ts +++ b/test/e2e/config.ts @@ -1,5 +1,5 @@ import assert from "assert"; -import { anvil, type Chain } from "thirdweb/chains"; +import { type Chain, anvil } from "thirdweb/chains"; assert(process.env.ENGINE_URL, "ENGINE_URL is required"); assert(process.env.ENGINE_ACCESS_TOKEN, "ENGINE_ACCESS_TOKEN is required"); diff --git a/test/e2e/scripts/counter.ts b/test/e2e/scripts/counter.ts index ccb9bd8de..9a0960b4e 100644 --- a/test/e2e/scripts/counter.ts +++ b/test/e2e/scripts/counter.ts @@ -1,9 +1,9 @@ // Anvil chain outputs every RPC call to stdout // 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 { join } from "path"; import { argv } from "bun"; import { readFile } from "fs/promises"; -import { join } from "path"; const file = join(__dirname, argv[2]); diff --git a/test/e2e/tests/extensions.test.ts b/test/e2e/tests/extensions.test.ts index 1126f2877..335b0bc49 100644 --- a/test/e2e/tests/extensions.test.ts +++ b/test/e2e/tests/extensions.test.ts @@ -1,7 +1,7 @@ +import { beforeAll, describe, expect, test } from "bun:test"; import assert from "assert"; import { sleep } from "bun"; -import { beforeAll, describe, expect, test } from "bun:test"; -import { getAddress, type Address } from "viem"; +import { type Address, getAddress } from "viem"; import { CONFIG } from "../config"; import type { setupEngine } from "../utils/engine"; import { setup } from "./setup"; diff --git a/test/e2e/tests/load.test.ts b/test/e2e/tests/load.test.ts index 1e31a2e4b..664421395 100644 --- a/test/e2e/tests/load.test.ts +++ b/test/e2e/tests/load.test.ts @@ -1,6 +1,6 @@ +import { describe, expect, test } from "bun:test"; import assert from "assert"; import { sleep } from "bun"; -import { describe, expect, test } from "bun:test"; import { getAddress } from "viem"; import { CONFIG } from "../config"; import { printStats } from "../utils/statistics"; diff --git a/test/e2e/tests/routes/erc1155-transfer.test.ts b/test/e2e/tests/routes/erc1155-transfer.test.ts index b2c015700..fb0a87a31 100644 --- a/test/e2e/tests/routes/erc1155-transfer.test.ts +++ b/test/e2e/tests/routes/erc1155-transfer.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import assert from "node:assert"; -import { ZERO_ADDRESS, type Address } from "thirdweb"; +import { type Address, ZERO_ADDRESS } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; diff --git a/test/e2e/tests/routes/erc20-transfer.test.ts b/test/e2e/tests/routes/erc20-transfer.test.ts index 7a22c149e..638d9f24f 100644 --- a/test/e2e/tests/routes/erc20-transfer.test.ts +++ b/test/e2e/tests/routes/erc20-transfer.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import assert from "node:assert"; -import { ZERO_ADDRESS, toWei, type Address } from "thirdweb"; +import { type Address, ZERO_ADDRESS, toWei } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; diff --git a/test/e2e/tests/routes/erc721-transfer.test.ts b/test/e2e/tests/routes/erc721-transfer.test.ts index c8844467a..d3eb241a9 100644 --- a/test/e2e/tests/routes/erc721-transfer.test.ts +++ b/test/e2e/tests/routes/erc721-transfer.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import assert from "node:assert"; -import { ZERO_ADDRESS, type Address } from "thirdweb"; +import { type Address, ZERO_ADDRESS } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; diff --git a/test/e2e/tests/setup.ts b/test/e2e/tests/setup.ts index c65b07e06..14cd21770 100644 --- a/test/e2e/tests/setup.ts +++ b/test/e2e/tests/setup.ts @@ -1,12 +1,12 @@ -import { env, sleep } from "bun"; import { afterAll, beforeAll } from "bun:test"; +import { env, sleep } from "bun"; import { createChain, getEngineBackendWallet, setupEngine, } from "../utils/engine"; -import { createThirdwebClient, type Address } from "thirdweb"; +import { type Address, createThirdwebClient } from "thirdweb"; import { CONFIG } from "../config"; import { startAnvil, stopAnvil } from "../utils/anvil"; diff --git a/test/e2e/tests/userop.test.ts b/test/e2e/tests/userop.test.ts index 18c5cba6d..fc1c54e7c 100644 --- a/test/e2e/tests/userop.test.ts +++ b/test/e2e/tests/userop.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import { randomBytes } from "crypto"; -import { getAddress, type Address } from "thirdweb"; +import { type Address, getAddress } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { DEFAULT_ACCOUNT_FACTORY_V0_6 } from "thirdweb/wallets/smart"; import type { ApiError } from "../../../sdk/dist/declarations/src/core/ApiError"; diff --git a/test/e2e/utils/anvil.ts b/test/e2e/utils/anvil.ts index 57f00be76..488cc7b1f 100644 --- a/test/e2e/utils/anvil.ts +++ b/test/e2e/utils/anvil.ts @@ -1,4 +1,4 @@ -import { createServer, type CreateServerReturnType } from "prool"; +import { type CreateServerReturnType, createServer } from "prool"; import { anvil } from "prool/instances"; let server: CreateServerReturnType | undefined; diff --git a/test/e2e/utils/transactions.ts b/test/e2e/utils/transactions.ts index 7e51b5a6c..c365cefd2 100644 --- a/test/e2e/utils/transactions.ts +++ b/test/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"; import { CONFIG } from "../config"; type Timing = { diff --git a/vitest.global-setup.ts b/vitest.global-setup.ts index 53f215c91..8f5316946 100644 --- a/vitest.global-setup.ts +++ b/vitest.global-setup.ts @@ -1,5 +1,5 @@ -import { config } from "dotenv"; import path from "node:path"; +import { config } from "dotenv"; config({ path: [path.resolve(".env.test.local"), path.resolve(".env.test")], diff --git a/yarn.lock b/yarn.lock index 833d26027..15d0cd971 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1500,15 +1500,36 @@ 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-community/eslint-utils@^4.4.0": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== + dependencies: + eslint-visitor-keys "^3.4.3" -"@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== +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + +"@eslint/config-array@^0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.0.tgz#3251a528998de914d59bb21ba4c11767cf1b3519" + integrity sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.0.tgz#168ee076f94b152c01ca416c3e5cf82290ab4fcd" + integrity sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg== + +"@eslint/eslintrc@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1520,10 +1541,22 @@ 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== +"@eslint/js@9.15.0": + version "9.15.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.15.0.tgz#df0e24fe869143b59731942128c19938fdbadfb5" + integrity sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== + +"@eslint/plugin-kit@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz#812980a6a41ecf3a8341719f92a6d1e784a2e0e8" + integrity sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA== + dependencies: + levn "^0.4.1" "@eth-optimism/contracts-bedrock@0.17.2": version "0.17.2" @@ -2494,30 +2527,34 @@ 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== +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" "@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== +"@humanwhocodes/retry@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== + "@ioredis/commands@^1.1.1": version "1.2.0" resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11" @@ -2935,7 +2972,7 @@ 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": +"@nodelib/fs.walk@^1.2.3": 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== @@ -4904,6 +4941,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== +"@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/glob@*": version "8.1.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc" @@ -4912,7 +4954,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.15", "@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== @@ -5027,11 +5069,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" @@ -5059,89 +5096,86 @@ 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" +"@typescript-eslint/eslint-plugin@^8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.15.0.tgz#c95c6521e70c8b095a684d884d96c0c1c63747d2" + integrity sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.15.0" + "@typescript-eslint/type-utils" "8.15.0" + "@typescript-eslint/utils" "8.15.0" + "@typescript-eslint/visitor-keys" "8.15.0" 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" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/parser@^8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.15.0.tgz#92610da2b3af702cfbc02a46e2a2daa6260a9045" + integrity sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A== + dependencies: + "@typescript-eslint/scope-manager" "8.15.0" + "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/typescript-estree" "8.15.0" + "@typescript-eslint/visitor-keys" "8.15.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== +"@typescript-eslint/scope-manager@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz#28a1a0f13038f382424f45a988961acaca38f7c6" + integrity sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/visitor-keys" "8.15.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== +"@typescript-eslint/type-utils@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.15.0.tgz#a6da0f93aef879a68cc66c73fe42256cb7426c72" + integrity sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw== dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@typescript-eslint/typescript-estree" "8.15.0" + "@typescript-eslint/utils" "8.15.0" debug "^4.3.4" - tsutils "^3.21.0" + ts-api-utils "^1.3.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/types@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.15.0.tgz#4958edf3d83e97f77005f794452e595aaf6430fc" + integrity sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ== -"@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== +"@typescript-eslint/typescript-estree@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz#915c94e387892b114a2a2cc0df2d7f19412c8ba7" + integrity sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/visitor-keys" "8.15.0" debug "^4.3.4" - globby "^11.1.0" + fast-glob "^3.3.2" is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.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== +"@typescript-eslint/utils@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.15.0.tgz#ac04679ad19252776b38b81954b8e5a65567cef6" + integrity sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ== 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" + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.15.0" + "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/typescript-estree" "8.15.0" + +"@typescript-eslint/visitor-keys@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz#9ea5a85eb25401d2aa74ec8a478af4e97899ea12" + integrity sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q== + dependencies: + "@typescript-eslint/types" "8.15.0" + eslint-visitor-keys "^4.2.0" "@vitest/coverage-v8@^2.0.3": version "2.0.3" @@ -5754,6 +5788,11 @@ acorn@^8.11.3, acorn@^8.8.2: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== +acorn@^8.14.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + acorn@^8.9.0: version "8.11.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" @@ -5861,11 +5900,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" @@ -6700,7 +6734,7 @@ 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: +cross-spawn@^7.0.0, 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== @@ -6709,6 +6743,15 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +cross-spawn@^7.0.5: + 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" + 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" @@ -6943,13 +6986,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" @@ -7175,28 +7211,20 @@ 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-config-prettier@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== -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== +eslint-scope@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== 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.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: 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== @@ -7206,28 +7234,37 @@ eslint-visitor-keys@^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== +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + +eslint@^9.15.0: + version "9.15.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.15.0.tgz#77c684a4e980e82135ebff8ee8f0a9106ce6b8a6" + integrity sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw== 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" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.19.0" + "@eslint/core" "^0.9.0" + "@eslint/eslintrc" "^3.2.0" + "@eslint/js" "9.15.0" + "@eslint/plugin-kit" "^0.2.3" + "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.3.0" - "@nodelib/fs.walk" "^1.2.8" + "@humanwhocodes/retry" "^0.4.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" - cross-spawn "^7.0.2" + cross-spawn "^7.0.5" 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" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^8.0.0" @@ -7236,15 +7273,11 @@ eslint@^9.3.0: 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" @@ -7270,6 +7303,15 @@ espree@^10.0.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^4.0.0" +espree@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== + dependencies: + acorn "^8.14.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.0" + espree@^9.0.0: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -7284,10 +7326,10 @@ 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== +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -7298,7 +7340,7 @@ esrecurse@^4.3.0: 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== @@ -7672,7 +7714,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^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: +fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -8087,18 +8129,6 @@ globals@^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" @@ -8433,6 +8463,11 @@ ignore@^5.2.0, ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== +ignore@^5.3.1: + 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" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -8609,11 +8644,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" @@ -9353,7 +9383,7 @@ 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: +merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -9422,7 +9452,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== @@ -9600,11 +9630,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" @@ -10876,7 +10901,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== @@ -10965,11 +10990,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" @@ -11278,11 +11298,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" @@ -11444,7 +11459,12 @@ 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: +ts-api-utils@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.0.tgz#709c6f2076e511a81557f3d07a0cbd566ae8195c" + integrity sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ== + +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== @@ -11464,13 +11484,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"