From 15225840985a21710ca0b7745b1b888992b11b8e Mon Sep 17 00:00:00 2001 From: Crishna Iyengar Date: Tue, 16 Jun 2026 10:11:32 -0400 Subject: [PATCH] add ink (57073) support V2 factory 0xfe57a6ba1951f69ae2ed4abe23e0f095df500c04 deployed at block 524511. USD pricing anchored on the WETH/USDC.e pair 0xfa3a9015e5fd82485835e23260bc98adadca8a01 (STABLE_TOKEN_PAIRS), REFERENCE_TOKEN = WETH. Whitelist: WETH, USDC.e, USDT0. Stablecoins: USDC.e, USDT0. Co-Authored-By: Claude Opus 4.8 (1M context) --- config/ink/.subgraph-env | 2 ++ config/ink/chain.ts | 33 +++++++++++++++++++++++++++++++++ config/ink/config.json | 5 +++++ script/utils/prepareNetwork.ts | 1 + 4 files changed, 41 insertions(+) create mode 100644 config/ink/.subgraph-env create mode 100644 config/ink/chain.ts create mode 100644 config/ink/config.json diff --git a/config/ink/.subgraph-env b/config/ink/.subgraph-env new file mode 100644 index 00000000..82b19699 --- /dev/null +++ b/config/ink/.subgraph-env @@ -0,0 +1,2 @@ +V2_TOKEN_SUBGRAPH_NAME="uniswap-v2-tokens-ink" +V2_SUBGRAPH_NAME="uniswap-v2-ink" diff --git a/config/ink/chain.ts b/config/ink/chain.ts new file mode 100644 index 00000000..a60f9eed --- /dev/null +++ b/config/ink/chain.ts @@ -0,0 +1,33 @@ +import { Address, BigDecimal, BigInt } from '@graphprotocol/graph-ts/index' + +export const FACTORY_ADDRESS = '0xfe57a6ba1951f69ae2ed4abe23e0f095df500c04' + +const WETH = '0x4200000000000000000000000000000000000006'.toLowerCase() +const USDCE = '0xF1815bd50389c46847f0Bda824eC8da914045D14'.toLowerCase() +const USDT0 = '0x0200C29006150606B650577BBE7B6248F58470c1'.toLowerCase() +const WETH_USDCE = '0xfa3a9015e5fd82485835e23260bc98adadca8a01'.toLowerCase() + +export const REFERENCE_TOKEN = WETH +export const STABLE_TOKEN_PAIRS = [WETH_USDCE] + +// token where amounts should contribute to tracked volume and liquidity +export const WHITELIST: string[] = [WETH, USDCE, USDT0] + +export const STABLECOINS = [USDCE, USDT0] + +// minimum liquidity required to count towards tracked volume for pairs with small # of Lps +export const MINIMUM_USD_THRESHOLD_NEW_PAIRS = BigDecimal.fromString('40000') + +// minimum liquidity for price to get tracked +export const MINIMUM_LIQUIDITY_THRESHOLD_ETH = BigDecimal.fromString('1') + +export class TokenDefinition { + address: Address + symbol: string + name: string + decimals: BigInt +} + +export const STATIC_TOKEN_DEFINITIONS: TokenDefinition[] = [] + +export const SKIP_TOTAL_SUPPLY: string[] = [] diff --git a/config/ink/config.json b/config/ink/config.json new file mode 100644 index 00000000..ce863227 --- /dev/null +++ b/config/ink/config.json @@ -0,0 +1,5 @@ +{ + "network": "ink", + "factory": "0xfe57a6ba1951f69ae2ed4abe23e0f095df500c04", + "startblock": "524511" +} diff --git a/script/utils/prepareNetwork.ts b/script/utils/prepareNetwork.ts index a9847f70..23b85fe0 100644 --- a/script/utils/prepareNetwork.ts +++ b/script/utils/prepareNetwork.ts @@ -10,6 +10,7 @@ export enum NETWORK { BLAST = 'blast-mainnet', BSC = 'bsc', CELO = 'celo', + INK = 'ink', LINEA = 'linea', ETHEREUM = 'ethereum', TEMPO = 'tempo',