diff --git a/libs/abis/.gitignore b/libs/abis/.gitignore deleted file mode 100644 index e15405d..0000000 --- a/libs/abis/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/src/types \ No newline at end of file diff --git a/libs/abis/src/abi/GettersFacet.json b/libs/abis/src/abi/GettersFacet.json deleted file mode 100644 index fb9773d..0000000 --- a/libs/abis/src/abi/GettersFacet.json +++ /dev/null @@ -1,340 +0,0 @@ -[ - { - "inputs": [], - "name": "baseTokenGasPriceMultiplierDenominator", - "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "baseTokenGasPriceMultiplierNominator", - "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "_selector", "type": "bytes4" }], - "name": "facetAddress", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "facetAddresses", - "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_facet", "type": "address" }], - "name": "facetFunctionSelectors", - "outputs": [{ "internalType": "bytes4[]", "name": "", "type": "bytes4[]" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "facets", - "outputs": [ - { - "components": [ - { "internalType": "address", "name": "addr", "type": "address" }, - { "internalType": "bytes4[]", "name": "selectors", "type": "bytes4[]" } - ], - "internalType": "struct IGetters.Facet[]", - "name": "result", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAdmin", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBaseToken", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBaseTokenBridge", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBridgehub", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getFirstUnprocessedPriorityTx", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2BootloaderBytecodeHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2DefaultAccountBytecodeHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2SystemContractsUpgradeBatchNumber", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2SystemContractsUpgradeBlockNumber", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2SystemContractsUpgradeTxHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPendingAdmin", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPriorityQueueSize", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPriorityTxMaxGasLimit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getProtocolVersion", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPubdataPricingMode", - "outputs": [{ "internalType": "enum PubdataPricingMode", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSemverProtocolVersion", - "outputs": [ - { "internalType": "uint32", "name": "", "type": "uint32" }, - { "internalType": "uint32", "name": "", "type": "uint32" }, - { "internalType": "uint32", "name": "", "type": "uint32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStateTransitionManager", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBatchesCommitted", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBatchesExecuted", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBatchesVerified", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBlocksCommitted", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBlocksExecuted", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBlocksVerified", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalPriorityTxs", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVerifier", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVerifierParams", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "recursionNodeLevelVkHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "recursionLeafLevelVkHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "recursionCircuitsSetVksHash", - "type": "bytes32" - } - ], - "internalType": "struct VerifierParams", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isDiamondStorageFrozen", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_l2BatchNumber", "type": "uint256" }, - { "internalType": "uint256", "name": "_l2MessageIndex", "type": "uint256" } - ], - "name": "isEthWithdrawalFinalized", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_facet", "type": "address" }], - "name": "isFacetFreezable", - "outputs": [{ "internalType": "bool", "name": "isFreezable", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "_selector", "type": "bytes4" }], - "name": "isFunctionFreezable", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_address", "type": "address" }], - "name": "isValidator", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_batchNumber", "type": "uint256" }], - "name": "l2LogsRootHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "priorityQueueFrontOperation", - "outputs": [ - { - "components": [ - { "internalType": "bytes32", "name": "canonicalTxHash", "type": "bytes32" }, - { "internalType": "uint64", "name": "expirationTimestamp", "type": "uint64" }, - { "internalType": "uint192", "name": "layer2Tip", "type": "uint192" } - ], - "internalType": "struct PriorityOperation", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_batchNumber", "type": "uint256" }], - "name": "storedBatchHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_batchNumber", "type": "uint256" }], - "name": "storedBlockHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/libs/abis/src/index.ts b/libs/abis/src/index.ts deleted file mode 100644 index eea524d..0000000 --- a/libs/abis/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./types"; diff --git a/libs/abis/tsconfig.lib.json b/libs/abis/tsconfig.lib.json deleted file mode 100644 index b52e454..0000000 --- a/libs/abis/tsconfig.lib.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "declaration": true, - "outDir": "../../dist/libs/abis" - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "test", "**/*spec.ts"] -} diff --git a/libs/providers/src/ethersEvmProvider.service.ts b/libs/providers/src/ethersEvmProvider.service.ts deleted file mode 100644 index 5acd9c9..0000000 --- a/libs/providers/src/ethersEvmProvider.service.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Injectable } from "@nestjs/common"; -import { FeeParams, IEvmProvider } from "@packages/providers/interfaces"; -import { Address } from "@packages/providers/types"; -import { GettersFacet__factory } from "@shared/abis"; -import { AbiCoder, JsonRpcProvider, Provider } from "ethers"; - -@Injectable() -export class EthersEvmProviderService implements IEvmProvider { - private readonly FEE_PARAMS_SLOT = - 0x0000000000000000000000000000000000000000000000000000000000000026n; - - provider: Provider; - abiCoder: AbiCoder; - - constructor(rpcUrl: string) { - this.provider = new JsonRpcProvider(rpcUrl); - this.abiCoder = AbiCoder.defaultAbiCoder(); - } - async getGasPrice(): Promise { - const { gasPrice } = await this.provider.getFeeData(); - - return gasPrice; - } - getTvl(): Promise { - throw new Error("Method not implemented."); - } - - async getChainType(diamondProxyAddress: Address): Promise<"Rollup" | "Validium"> { - const gettersFacet = GettersFacet__factory.connect(diamondProxyAddress, this.provider); - const chainType = await gettersFacet.getPubdataPricingMode(); - - return chainType === 0n ? "Rollup" : "Validium"; - } - async getTotalBatchesCommitted(diamondProxyAddress: Address): Promise { - const gettersFacet = GettersFacet__factory.connect(diamondProxyAddress, this.provider); - return gettersFacet.getTotalBatchesCommitted(); - } - async getTotalBatchesVerified(diamondProxyAddress: Address): Promise { - const gettersFacet = GettersFacet__factory.connect(diamondProxyAddress, this.provider); - return gettersFacet.getTotalBatchesVerified(); - } - async getTotalBatchesExecuted(diamondProxyAddress: Address): Promise { - const gettersFacet = GettersFacet__factory.connect(diamondProxyAddress, this.provider); - return gettersFacet.getTotalBatchesExecuted(); - } - async getFeeParams(diamondProxyAddress: Address): Promise { - const feeParams = await this.provider.getStorage(diamondProxyAddress, this.FEE_PARAMS_SLOT); - - const decodedFeeParams = this.decodeResponseData(feeParams, [ - "uint8", - "uint32", - "uint32", - "uint32", - "uint32", - "uint64", - ]) as FeeParams; - - return decodedFeeParams; - } - - private decodeResponseData(data: string, decodeTypes: string[]): unknown { - const [decoded] = this.abiCoder.decode(decodeTypes, data); - return decoded; - } -} diff --git a/libs/providers/src/exceptions/contractCall.exception.ts b/libs/providers/src/exceptions/contractCall.exception.ts new file mode 100644 index 0000000..1a579a8 --- /dev/null +++ b/libs/providers/src/exceptions/contractCall.exception.ts @@ -0,0 +1,13 @@ +/** + * Represents an exception that occurs when there is an error calling a contract on a specific chain. + */ +export class ContractCallException extends Error { + /** + * @param address - The address of the contract. + * @param chainId - The ID of the chain. + * @param errorMessage - The error message associated with the exception. + */ + constructor(address: string, chainId: number, errorMessage: string) { + super(`Error calling contract ${address} on chain ${chainId}. Message: ${errorMessage}`); + } +} diff --git a/libs/providers/src/exceptions/index.ts b/libs/providers/src/exceptions/index.ts new file mode 100644 index 0000000..8d0adf0 --- /dev/null +++ b/libs/providers/src/exceptions/index.ts @@ -0,0 +1 @@ +export * from "./contractCall.exception"; diff --git a/libs/providers/src/index.ts b/libs/providers/src/index.ts index 917ae50..99d3191 100644 --- a/libs/providers/src/index.ts +++ b/libs/providers/src/index.ts @@ -1,2 +1,2 @@ export * from "./providers.module"; -export * from "./evmProvider.service"; +export * from "./providers"; diff --git a/libs/providers/src/interfaces/evmProvider.interface.ts b/libs/providers/src/interfaces/evmProvider.interface.ts index d91dfaf..03307a8 100644 --- a/libs/providers/src/interfaces/evmProvider.interface.ts +++ b/libs/providers/src/interfaces/evmProvider.interface.ts @@ -1,12 +1,15 @@ -import { FeeParams } from "@packages/providers/interfaces/feeParams.interface"; -import { Address } from "@packages/providers/types/evm.type"; - +/** + * An **IEvmProvider** is a wrapper around an Ethereum Virtual Machine (EVM) provider. + * + * It allows for reading data from smart contracts on EVM-compatible networks. + * + * Its agnostic to the underlying provider, which could be ethers.js, web3.js, or any other library. + */ export interface IEvmProvider { - getGasPrice(): Promise; - getTvl(): Promise; - getChainType(diamondProxyAddress: Address): Promise<"Rollup" | "Validium">; - getTotalBatchesCommitted(diamondProxyAddress: Address): Promise; - getTotalBatchesVerified(diamondProxyAddress: Address): Promise; - getTotalBatchesExecuted(diamondProxyAddress: Address): Promise; - getFeeParams(diamondProxyAddress: Address): Promise; + /** + * Reads data from a smart contract on the Ethereum network by simulating a contract call. + * @returns A promise that resolves to the raw result of the contract call. + * @throws {ContractCallException} If there is an error while calling the contract. + */ + readContract(contractAddress: string, calldata: string): Promise; } diff --git a/libs/providers/src/interfaces/feeParams.interface.ts b/libs/providers/src/interfaces/feeParams.interface.ts deleted file mode 100644 index 090eb26..0000000 --- a/libs/providers/src/interfaces/feeParams.interface.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface FeeParams { - pubdataPricingMode: number; - batchOverheadL1Gas: number; - maxPubdataPerBatch: number; - maxL2GasPerBatch: number; - priorityTxMaxPubdata: number; - minimalL2GasPrice: bigint; -} diff --git a/libs/providers/src/providers.module.ts b/libs/providers/src/providers.module.ts index c36d2e1..050ce66 100644 --- a/libs/providers/src/providers.module.ts +++ b/libs/providers/src/providers.module.ts @@ -1,7 +1,5 @@ import { Module } from "@nestjs/common"; -import { EthersEvmProviderService } from "@packages/providers/ethersEvmProvider.service"; - -import { EvmProviderService } from "./evmProvider.service"; +import { EthersEvmProviderService, EvmProviderService } from "@packages/providers/providers"; @Module({ providers: [EvmProviderService, EthersEvmProviderService], diff --git a/libs/providers/src/providers/ethersEvmProvider.service.ts b/libs/providers/src/providers/ethersEvmProvider.service.ts new file mode 100644 index 0000000..c60999b --- /dev/null +++ b/libs/providers/src/providers/ethersEvmProvider.service.ts @@ -0,0 +1,55 @@ +import { Injectable } from "@nestjs/common"; +import { ContractCallException } from "@packages/providers/exceptions"; +import { IEvmProvider } from "@packages/providers/interfaces"; +import { isCallException, JsonRpcProvider, Provider } from "ethers"; + +/** + * An **EthersEvmProviderService** is a wrapper of Ethers.js's **Provider** class. + * It allows for reading data from smart contracts on EVM-compatible networks. + */ +@Injectable() +export class EthersEvmProviderService implements IEvmProvider { + provider: Provider; + + /** + * @param rpcUrl - The URL of the Ethereum JSON-RPC endpoint. + * @param chainId - The chain ID of the Ethereum network. Defaults to 1 (mainnet). + */ + constructor( + rpcUrl: string, + readonly chainId: number = 1, + ) { + this.provider = new JsonRpcProvider(rpcUrl, chainId); + } + + /** + * Reads data from a smart contract on the Ethereum Virtual Machine (EVM). + * + * @param contractAddress - The address of the smart contract. + * @param calldata - The data to be sent to the smart contract. + * @returns A promise that resolves to the result of the contract call. + * @throws {ContractCallException} If there is an error while calling the contract. + */ + async readContract(contractAddress: string, calldata: string): Promise { + try { + const rawResult = await this.provider.call({ + to: contractAddress, + data: calldata, + }); + + return rawResult; + } catch (error: unknown) { + let message = `Calldata: ${calldata}.`; + if (isCallException(error)) { + message += `Reason: ${error.reason}. Code: ${error.code}`; + if (error.invocation) { + message += `Function: ${error.invocation.method} (${error.invocation.signature})`; + } + } else { + message += `Error: ${error}`; + } + + throw new ContractCallException(contractAddress, this.chainId, message); + } + } +} diff --git a/libs/providers/src/evmProvider.service.spec.ts b/libs/providers/src/providers/evmProvider.service.spec.ts similarity index 100% rename from libs/providers/src/evmProvider.service.spec.ts rename to libs/providers/src/providers/evmProvider.service.spec.ts diff --git a/libs/providers/src/evmProvider.service.ts b/libs/providers/src/providers/evmProvider.service.ts similarity index 100% rename from libs/providers/src/evmProvider.service.ts rename to libs/providers/src/providers/evmProvider.service.ts diff --git a/libs/providers/src/providers/index.ts b/libs/providers/src/providers/index.ts new file mode 100644 index 0000000..f9e21a7 --- /dev/null +++ b/libs/providers/src/providers/index.ts @@ -0,0 +1,2 @@ +export * from "./ethersEvmProvider.service"; +export * from "./evmProvider.service"; diff --git a/libs/providers/src/types/evm.type.ts b/libs/providers/src/types/evm.type.ts deleted file mode 100644 index 0679a0c..0000000 --- a/libs/providers/src/types/evm.type.ts +++ /dev/null @@ -1 +0,0 @@ -export type Address = string; diff --git a/libs/providers/src/types/index.ts b/libs/providers/src/types/index.ts deleted file mode 100644 index 40237ab..0000000 --- a/libs/providers/src/types/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./evm.type"; diff --git a/nest-cli.json b/nest-cli.json index b1ea441..e966f90 100644 --- a/nest-cli.json +++ b/nest-cli.json @@ -1,50 +1,41 @@ { - "$schema": "https://json.schemastore.org/nest-cli", - "collection": "@nestjs/schematics", - "sourceRoot": "apps/api/src", - "compilerOptions": { - "deleteOutDir": true, - "webpack": true, - "tsConfigPath": "apps/api/tsconfig.app.json" - }, - "monorepo": true, - "root": "apps/api", - "projects": { - "api": { - "type": "application", - "root": "apps/api", - "entryFile": "main", - "sourceRoot": "apps/api/src", - "compilerOptions": { - "tsConfigPath": "apps/api/tsconfig.app.json", - "plugins": [ - { - "name": "@nestjs/swagger", - "options": { - "classValidatorShim": false, - "introspectComments": true - } - } - ] - } - }, - "providers": { - "type": "library", - "root": "libs/providers", - "entryFile": "index", - "sourceRoot": "libs/providers/src", - "compilerOptions": { - "tsConfigPath": "libs/providers/tsconfig.lib.json" - } + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "apps/api/src", + "compilerOptions": { + "deleteOutDir": true, + "webpack": true, + "tsConfigPath": "apps/api/tsconfig.app.json" }, - "abis": { - "type": "library", - "root": "libs/abis", - "entryFile": "index", - "sourceRoot": "libs/abis/src", - "compilerOptions": { - "tsConfigPath": "libs/abis/tsconfig.lib.json" - } + "monorepo": true, + "root": "apps/api", + "projects": { + "api": { + "type": "application", + "root": "apps/api", + "entryFile": "main", + "sourceRoot": "apps/api/src", + "compilerOptions": { + "tsConfigPath": "apps/api/tsconfig.app.json", + "plugins": [ + { + "name": "@nestjs/swagger", + "options": { + "classValidatorShim": false, + "introspectComments": true + } + } + ] + } + }, + "providers": { + "type": "library", + "root": "libs/providers", + "entryFile": "index", + "sourceRoot": "libs/providers/src", + "compilerOptions": { + "tsConfigPath": "libs/providers/tsconfig.lib.json" + } + } } - } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 439e833..abef058 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,7 +52,7 @@ importers: specifier: 1.0.4 version: 1.0.4 '@typechain/ethers-v6': - specifier: ^0.5.1 + specifier: 0.5.1 version: 0.5.1(ethers@6.13.1)(typechain@8.3.2(typescript@5.1.3))(typescript@5.1.3) '@types/express': specifier: 4.17.17 @@ -115,7 +115,7 @@ importers: specifier: 4.2.0 version: 4.2.0 typechain: - specifier: ^8.3.2 + specifier: 8.3.2 version: 8.3.2(typescript@5.1.3) typescript: specifier: 5.1.3 diff --git a/tsconfig.json b/tsconfig.json index 2ec8002..1196eab 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,37 +1,27 @@ { - "extends": "@total-typescript/tsconfig/tsc/no-dom/app", - "compilerOptions": { - "module": "commonjs", - "declaration": true, - "removeComments": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "target": "ES2021", - "sourceMap": true, - "outDir": "./dist", - "baseUrl": "./", - "incremental": true, - "skipLibCheck": true, - "strictNullChecks": true, - "noImplicitAny": true, - "strictBindCallApply": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "paths": { - "@packages/providers": [ - "libs/providers/src" - ], - "@packages/providers/*": [ - "libs/providers/src/*" - ], - "@shared/abis": [ - "libs/abis/src" - ], - "@shared/abis/*": [ - "libs/abis/src/*" - ] - }, - "verbatimModuleSyntax": false - } -} \ No newline at end of file + "extends": "@total-typescript/tsconfig/tsc/no-dom/app", + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": true, + "noImplicitAny": true, + "strictBindCallApply": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "paths": { + "@packages/providers": ["libs/providers/src"], + "@packages/providers/*": ["libs/providers/src/*"] + }, + "verbatimModuleSyntax": false + } +}