1
- import { Type , type Static } from "@sinclair/typebox" ;
1
+ import { type Static , Type } from "@sinclair/typebox" ;
2
2
import type { FastifyInstance } from "fastify" ;
3
3
import { StatusCodes } from "http-status-codes" ;
4
4
import SuperJSON from "superjson" ;
@@ -10,14 +10,14 @@ import {
10
10
resolveMethod ,
11
11
} from "thirdweb" ;
12
12
import { prepareMethod } from "thirdweb/contract" ;
13
- import { decodeAbiParameters } from "viem/utils" ;
14
13
import type { AbiFunction } from "viem" ;
15
- import { createCustomError } from "../../../middleware/error" ;
16
- import { getChainIdFromChain } from "../../../utils/chain" ;
17
- import { standardResponseSchema } from "../../../schemas/shared-api-schemas" ;
14
+ import { decodeAbiParameters } from "viem/utils" ;
18
15
import { getChain } from "../../../../shared/utils/chain" ;
19
- import { thirdwebClient } from "../../../../shared/utils/sdk" ;
20
16
import { prettifyError } from "../../../../shared/utils/error" ;
17
+ import { thirdwebClient } from "../../../../shared/utils/sdk" ;
18
+ import { createCustomError } from "../../../middleware/error" ;
19
+ import { standardResponseSchema } from "../../../schemas/shared-api-schemas" ;
20
+ import { getChainIdFromChain } from "../../../utils/chain" ;
21
21
22
22
const MULTICALL3_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11" ;
23
23
@@ -118,7 +118,7 @@ export async function readBatchRoute(fastify: FastifyInstance) {
118
118
) ;
119
119
120
120
// Get Multicall3 contract
121
- const multicall = await getContract ( {
121
+ const multicall = getContract ( {
122
122
chain,
123
123
address : multicallAddress ,
124
124
client : thirdwebClient ,
@@ -132,7 +132,7 @@ export async function readBatchRoute(fastify: FastifyInstance) {
132
132
} ) ;
133
133
134
134
// Process results
135
- const processedResults = results . map ( ( result : unknown , i ) => {
135
+ const processedResults = results . map ( ( result : unknown , i : number ) => {
136
136
const { success, returnData } = result as {
137
137
success : boolean ;
138
138
returnData : unknown ;
0 commit comments