Skip to content

Commit

Permalink
linting and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bergarces committed Dec 6, 2024
1 parent e02b88f commit 6a3a00c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
import { getAddress } from 'ethers'
import { AdaptersController } from '../../../../core/adaptersController'
import { Chain } from '../../../../core/constants/chains'
import { CacheToDb } from '../../../../core/decorators/cacheToDb'
import { NotImplementedError } from '../../../../core/errors/errors'
import { CustomJsonRpcProvider } from '../../../../core/provider/CustomJsonRpcProvider'
import { logger } from '../../../../core/utils/logger'
import { Helpers } from '../../../../scripts/helpers'
import {
IProtocolAdapter,
ProtocolToken,
} from '../../../../types/IProtocolAdapter'
import {
AssetType,
GetEventsInput,
GetPositionsInput,
GetRewardPositionsInput,
GetTotalValueLockedInput,
MovementsByBlock,
MovementsByBlockReward,
PositionType,
ProtocolAdapterParams,
ProtocolDetails,
ProtocolPosition,
ProtocolTokenTvl,
Underlying,
UnderlyingReward,
UnwrapExchangeRate,
UnwrapInput,
} from '../../../../types/adapter'
import { Erc20Metadata } from '../../../../types/erc20Metadata'
import { Protocol } from '../../../protocols'

export class QuickswapV2DQuickAdapter implements IProtocolAdapter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { formatUnits, getAddress } from 'ethers'
import { getAddress } from 'ethers'
import { AdaptersController } from '../../../../core/adaptersController'
import { Chain } from '../../../../core/constants/chains'
import { NotImplementedError } from '../../../../core/errors/errors'
import { CustomJsonRpcProvider } from '../../../../core/provider/CustomJsonRpcProvider'
import { filterMapAsync } from '../../../../core/utils/filters'
import { getTokenMetadata } from '../../../../core/utils/getTokenMetadata'
import { logger } from '../../../../core/utils/logger'
import { Helpers } from '../../../../scripts/helpers'
import {
IProtocolAdapter,
Expand All @@ -30,6 +29,7 @@ import { Erc20Metadata } from '../../../../types/erc20Metadata'
import { Protocol } from '../../../protocols'
import { PositionManager__factory } from '../../contracts'

// A deadline value needs to be passed to the call, so a stub is generated here
const deadline = Math.floor(Date.now() - 1000) + 60 * 10

const positionManagerCommonAddress = getAddress(
Expand All @@ -42,7 +42,7 @@ const contractAddresses: Partial<Record<Chain, { positionManager: string }>> = {
},
}

export const maxUint128 = BigInt(2) ** BigInt(128) - BigInt(1)
export const maxUint128 = 2n ** 128n - 1n

export class QuickswapV3PoolAdapter implements IProtocolAdapter {
adapterSettings = {
Expand Down

0 comments on commit 6a3a00c

Please sign in to comment.