/
config.ts
56 lines (52 loc) · 1.21 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { Token } from '@uniswap/sdk-core'
import { FeeAmount } from '@uniswap/v3-sdk'
import { DAI_TOKEN, USDC_TOKEN } from './libs/constants'
// Sets if the example should run locally or on chain
export enum Environment {
LOCAL,
WALLET_EXTENSION,
MAINNET,
}
// Inputs that configure this example to run
export interface ExampleConfig {
env: Environment
rpc: {
local: string
mainnet: string
}
wallet: {
address: string
privateKey: string
}
tokens: {
token0: Token
token0Amount: number
token1: Token
token1Amount: number
poolFee: FeeAmount
fractionToRemove: number
fractionToAdd: number
}
}
// Example Configuration
export const CurrentConfig: ExampleConfig = {
env: Environment.LOCAL,
rpc: {
local: 'http://localhost:8545',
mainnet: 'https://mainnet.infura.io/v3/0ac57a06f2994538829c14745750d721',
},
wallet: {
address: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
privateKey:
'0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
},
tokens: {
token0: USDC_TOKEN,
token0Amount: 1000,
token1: DAI_TOKEN,
token1Amount: 1000,
poolFee: FeeAmount.LOW,
fractionToRemove: 1,
fractionToAdd: 0.5,
},
}