Skip to content

Commit 917ddb7

Browse files
authored
v3 tempo support
2 parents c2443bd + 907eb8f commit 917ddb7

4 files changed

Lines changed: 50 additions & 0 deletions

File tree

config/tempo/.subgraph-env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
V3_TOKEN_SUBGRAPH_NAME="uniswap-v3-tokens-tempo"
2+
V3_SUBGRAPH_NAME="uniswap-v3-tempo"

config/tempo/chain.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { Address, BigDecimal, BigInt } from '@graphprotocol/graph-ts'
2+
3+
const PATHUSD = '0x20C0000000000000000000000000000000000000'.toLowerCase()
4+
const USDT0 = '0x20c00000000000000000000014f22ca97301eb73'.toLowerCase()
5+
const USDCE = '0x20C000000000000000000000b9537d11c60E8b50'.toLowerCase()
6+
const EURC = '0x20c0000000000000000000001621e21F71CF12fb'.toLowerCase()
7+
8+
const PATHUSD_USDC_POOL = '0x704214be4982ccec66c5d538f2721085414320ee'.toLowerCase()
9+
10+
export const FACTORY_ADDRESS = '0x24a3d4757e330890a8b8978028c9e58e04611fd6'
11+
12+
export const REFERENCE_TOKEN = PATHUSD
13+
export const STABLE_TOKEN_POOL = PATHUSD_USDC_POOL
14+
15+
export const TVL_MULTIPLIER_THRESHOLD = '2'
16+
export const MATURE_MARKET = '1000000'
17+
export const MINIMUM_NATIVE_LOCKED = BigDecimal.fromString('2000')
18+
19+
export const ROLL_DELETE_HOUR = 768
20+
export const ROLL_DELETE_MINUTE = 1680
21+
22+
export const ROLL_DELETE_HOUR_LIMITER = BigInt.fromI32(500)
23+
export const ROLL_DELETE_MINUTE_LIMITER = BigInt.fromI32(1000)
24+
25+
// token where amounts should contribute to tracked volume and liquidity
26+
// usually tokens that many tokens are paired with s
27+
export const WHITELIST_TOKENS: string[] = [PATHUSD, USDT0, USDCE, EURC]
28+
29+
export const STABLE_COINS: string[] = [PATHUSD, USDT0, USDCE]
30+
31+
export const SKIP_POOLS: string[] = []
32+
33+
export const POOL_MAPINGS: Array<Address[]> = []
34+
35+
export class TokenDefinition {
36+
address: Address
37+
symbol: string
38+
name: string
39+
decimals: BigInt
40+
}
41+
42+
export const STATIC_TOKEN_DEFINITIONS: TokenDefinition[] = []

config/tempo/config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"network": "tempo",
3+
"factory": "0x24a3d4757e330890a8b8978028c9e58e04611fd6",
4+
"startblock": "6606180"
5+
}

script/utils/prepareNetwork.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export enum NETWORK {
1717
MONAD = 'monad',
1818
OPTIMISM = 'optimism',
1919
SONEIUM = 'soneium-mainnet',
20+
TEMPO = 'tempo',
2021
UNICHAIN = 'unichain-mainnet',
2122
WORLDCHAIN = 'worldchain-mainnet',
2223
XLAYER = 'xlayer-mainnet',

0 commit comments

Comments
 (0)