Skip to content

Commit

Permalink
fix: import lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
saadahmsiddiqui committed Oct 29, 2024
1 parent 845c920 commit 3450ebb
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/indexer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SPDX-License-Identifier: LGPL-3.0-only
import nodeCleanup from "node-cleanup"
import { FastifyInstance } from "fastify"
import { PrismaClient } from "@prisma/client"
import { EthereumConfig, SubstrateConfig, Config, Environment, Network, SubstrateResource, SygmaConfig } from "@buildwithsygma/core"
import { CronJob } from "cron"
import { caching } from "cache-manager"
import { logger } from "../utils/logger"
Expand All @@ -23,7 +24,6 @@ import AccountRepository from "./repository/account"
import CoinMarketCapService from "./services/coinmarketcap/coinmarketcap.service"
import { checkTransferStatus, getCronJob } from "./services/monitoringService"
import { NotificationSender } from "./services/monitoringService/notificationSender"
import { EthereumConfig, SubstrateConfig, Config, Environment, Network, SubstrateResource, SygmaConfig } from "@buildwithsygma/core"

interface DomainIndexer {
listenToEvents(): Promise<void>
Expand Down
2 changes: 1 addition & 1 deletion src/indexer/services/evmIndexer/evmEventParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
The Licensed Work is (c) 2023 Sygma
SPDX-License-Identifier: LGPL-3.0-only
*/
import { EthereumConfig, EvmResource, SubstrateConfig } from "@buildwithsygma/core"
import { Provider, Log } from "ethers"

import { getDecodedLogs } from "../../utils/evm"
import { logger } from "../../../utils/logger"
import { DecodedLogs } from "./evmTypes"
import { EthereumConfig, EvmResource, SubstrateConfig } from "@buildwithsygma/core"

export const nativeTokenAddress = "0x0000000000000000000000000000000000000000"

Expand Down
4 changes: 1 addition & 3 deletions src/indexer/services/evmIndexer/evmIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
The Licensed Work is (c) 2023 Sygma
SPDX-License-Identifier: LGPL-3.0-only
*/

import { EthereumConfig, EvmResource, Resource, SubstrateConfig, SygmaConfig } from "@buildwithsygma/core"
import { ethers } from "ethers"

import winston from "winston"
import { sleep } from "../../utils/substrate"
import { saveDepositLogs, saveFailedHandlerExecutionLogs, saveProposalExecutionLogs } from "../../utils/evm"
Expand All @@ -19,7 +18,6 @@ import CoinMarketCapService from "../coinmarketcap/coinmarketcap.service"
import { OfacComplianceService } from "../ofac"
import { getLogs } from "./evmfilter"
import { decodeLogs } from "./evmEventParser"
import { EthereumConfig, EvmResource, Resource, SubstrateConfig, SygmaConfig } from "@buildwithsygma/core"

const BLOCK_TIME = Number(process.env.BLOCK_TIME) || 15000
const BLOCK_DELAY = Number(process.env.BLOCK_DELAY) || 10
Expand Down
2 changes: 1 addition & 1 deletion src/indexer/services/substrateIndexer/substrateIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
The Licensed Work is (c) 2023 Sygma
SPDX-License-Identifier: LGPL-3.0-only
*/
import { SubstrateConfig, SubstrateResource, SygmaConfig } from "@buildwithsygma/core"
import { ApiPromise, WsProvider } from "@polkadot/api"
import FeeRepository from "indexer/repository/fee"
import winston from "winston"
Expand All @@ -13,7 +14,6 @@ import TransferRepository from "../../../indexer/repository/transfer"
import { saveEvents, sleep } from "../../../indexer/utils/substrate"
import AccountRepository from "../../../indexer/repository/account"
import CoinMarketCapService from "../coinmarketcap/coinmarketcap.service"
import { SubstrateConfig, SubstrateResource, SygmaConfig } from "@buildwithsygma/core"

const BLOCK_TIME = Number(process.env.BLOCK_TIME) || 12000
const BLOCK_DELAY = Number(process.env.BLOCK_DELAY) || 10
Expand Down
2 changes: 1 addition & 1 deletion src/indexer/utils/evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
The Licensed Work is (c) 2023 Sygma
SPDX-License-Identifier: LGPL-3.0-only
*/
import { Network, EthereumConfig, EvmResource, ResourceType, SubstrateConfig, SygmaConfig } from "@buildwithsygma/core"
import { BytesLike, Log, LogDescription, Provider, TransactionReceipt, getBytes, AbiCoder, formatUnits, BigNumberish, ethers } from "ethers"
import { ObjectId } from "mongodb"
import { TransferStatus } from "@prisma/client"
Expand All @@ -26,7 +27,6 @@ import FeeRepository from "../../repository/fee"
import ExecutionRepository from "../../repository/execution"
import { OfacComplianceService } from "../../services/ofac"
import CoinMarketCapService from "../../services/coinmarketcap/coinmarketcap.service"
import { Network, EthereumConfig, EvmResource, ResourceType, SubstrateConfig, SygmaConfig } from "@buildwithsygma/core"

export const nativeTokenAddress = "0x0000000000000000000000000000000000000000"
type Junction = {
Expand Down
4 changes: 2 additions & 2 deletions src/indexer/utils/substrate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ SPDX-License-Identifier: LGPL-3.0-only
/* eslint-disable @typescript-eslint/no-misused-promises */
import { ObjectId } from "mongodb"
import { AbiCoder, formatEther } from "ethers"
import { SubstrateConfig, SubstrateResource, SygmaConfig } from "@buildwithsygma/core"
import { BigNumber } from "@ethersproject/bignumber"
import { BlockHash, XcmAssetId } from "@polkadot/types/interfaces"
import { ApiPromise } from "@polkadot/api"
import { TransferStatus } from "@prisma/client"
import { BigNumber } from "@ethersproject/bignumber"
import FeeRepository from "indexer/repository/fee"
import ExecutionRepository from "../../repository/execution"
import TransferRepository from "../../repository/transfer"
Expand All @@ -31,7 +32,6 @@ import { DecodedDepositLog } from "../../../indexer/services/evmIndexer/evmTypes
import { getSubstrateEvents } from "../../../indexer/services/substrateIndexer/substrateEventParser"
import AccountRepository from "../../repository/account"
import CoinMarketCapService from "../../../indexer/services/coinmarketcap/coinmarketcap.service"
import { SubstrateConfig, SubstrateResource, SygmaConfig } from "@buildwithsygma/core"

export async function saveProposalExecution(
proposalExecutionData: ProposalExecutionDataToSave,
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/classes/PriceCalculation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ The Licensed Work is (c) 2023 Sygma
SPDX-License-Identifier: LGPL-3.0-only
*/
import { MemoryCache } from "cache-manager"
import { SygmaConfig } from "@buildwithsygma/core"
import { Transfer } from "@prisma/client"
import CoinMarketCapService from "../../indexer/services/coinmarketcap/coinmarketcap.service"
import TransferRepository from "../../indexer/repository/transfer"
import { logger } from "../../utils/logger"
import { IFixInterface } from "../interfaces"
import TransfersService from "../../services/transfers.service"
import { SygmaConfig } from "@buildwithsygma/core"

export class PriceCalculation implements IFixInterface {
private memoryCache: MemoryCache
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ The Licensed Work is (c) 2023 Sygma
SPDX-License-Identifier: LGPL-3.0-only
*/
import { caching } from "cache-manager"
import { Config, Environment, SygmaConfig } from "@buildwithsygma/core"
import { logger } from "../utils/logger"
import { PriceCalculation } from "./classes/PriceCalculation"
import { IFixInterface } from "./interfaces"
import { DuplicateRemover } from "./classes/DuplicateRemover"
import { Config, Environment, SygmaConfig } from "@buildwithsygma/core"

export enum FixType {
PriceCalculations = "price-calculations",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ SPDX-License-Identifier: LGPL-3.0-only
*/
import { Signer, ethers, AbiCoder } from "ethers"
import { ERC20Handler__factory as Erc20HandlerFactory, ERC721Handler__factory as Erc721HandlerFactory } from "@buildwithsygma/sygma-contracts"
import { EthereumConfig, ResourceType, SygmaConfig } from "@buildwithsygma/core"
import { sleep } from "../indexer/utils/substrate"
import { HandlersMap } from "../sygmaTypes"
import { IncludedQueryParams } from "../interfaces"
import { EthereumConfig, ResourceType, SygmaConfig } from "@buildwithsygma/core"

export function getNetworkName(domainId: number, sygmaConfig: SygmaConfig): string {
return sygmaConfig.domains.find(c => c.id === domainId)?.name || ""
Expand Down

0 comments on commit 3450ebb

Please sign in to comment.