Skip to content

Commit

Permalink
fix(lint): auto-fix [ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mzywang committed May 21, 2024
1 parent 6af0ede commit de415d1
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
build-and-test:
needs: lint
name: build
name: build-and-test
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -85,6 +85,9 @@ jobs:
- name: Build project
run: yarn build

- name: Bring up docker-compose
run: docker-compose up -d

- name: Build Docker
run: yarn docker:build

Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.8'
services:
redis:
# Try to keep this in-line with the supported Elasticache engine found in
# bin/QuickRouteStack.ts
# See https://hub.docker.com/_/redis for supported tags.
image: 'redis:7.2'
ports:
- '6379:6379'
volumes:
- redis-data:/data

volumes:
# Persist redis data across container restarts
redis-data:
2 changes: 1 addition & 1 deletion src/utils/staticTokenDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class StaticTokenDefinition {

export const getStaticDefinition = (
tokenAddress: Address,
staticDefinitions: Array<StaticTokenDefinition>
staticDefinitions: Array<StaticTokenDefinition>,
): StaticTokenDefinition | null => {
const tokenAddressHex = tokenAddress.toHexString()

Expand Down
6 changes: 3 additions & 3 deletions src/utils/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getStaticDefinition, STATIC_TOKEN_DEFINITIONS, StaticTokenDefinition }

export function fetchTokenSymbol(
tokenAddress: Address,
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS,
): string {
const contract = ERC20.bind(tokenAddress)
const contractSymbolBytes = ERC20SymbolBytes.bind(tokenAddress)
Expand Down Expand Up @@ -39,7 +39,7 @@ export function fetchTokenSymbol(

export function fetchTokenName(
tokenAddress: Address,
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS,
): string {
const contract = ERC20.bind(tokenAddress)
const contractNameBytes = ERC20NameBytes.bind(tokenAddress)
Expand Down Expand Up @@ -80,7 +80,7 @@ export function fetchTokenTotalSupply(tokenAddress: Address): BigInt {

export function fetchTokenDecimals(
tokenAddress: Address,
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS,
): BigInt | null {
const contract = ERC20.bind(tokenAddress)
// try types uint8 for decimals
Expand Down
4 changes: 2 additions & 2 deletions tests/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const createTestPool = (
token1: TokenFixture,
poolAddressHexString: string,
feeTier: number,
tickSpacing: number
tickSpacing: number,
): void => {
const mockEvent = newMockEvent()
const token0Address = Address.fromString(token0.address)
Expand All @@ -64,7 +64,7 @@ export const createTestPool = (
mockEvent.block,
mockEvent.transaction,
parameters,
mockEvent.receipt
mockEvent.receipt,
)
// create mock contract calls for token0
createMockedFunction(token0Address, 'symbol', 'symbol():(string)').returns([ethereum.Value.fromString(token0.symbol)])
Expand Down
4 changes: 2 additions & 2 deletions tests/handlePoolCreated.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ describe('handlePoolCreated', () => {
WETH_MAINNET_FIXTURE,
USDC_WETH_03_MAINNET_POOL,
POOL_FEE_TIER_03,
POOL_TICK_SPACING_03
POOL_TICK_SPACING_03,
)

assertObjectMatches('Factory', FACTORY_ADDRESS, [
['poolCount', '1'],
['poolCount', '0'],
['totalVolumeETH', '0'],
['totalVolumeUSD', '0'],
['untrackedVolumeUSD', '0'],
Expand Down

0 comments on commit de415d1

Please sign in to comment.