forked from Uniswap/v2-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.ts
50 lines (40 loc) · 1.16 KB
/
constants.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
import JSBI from 'jsbi'
// exports for external consumption
export type BigintIsh = JSBI | bigint | string
export enum ChainId {
MAINNET = 1,
ROPSTEN = 3,
RINKEBY = 4,
GÖRLI = 5,
KOVAN = 42
}
export enum TradeType {
EXACT_INPUT,
EXACT_OUTPUT
}
export enum Rounding {
ROUND_DOWN,
ROUND_HALF_UP,
ROUND_UP
}
export const FACTORY_ADDRESS = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f'
export const INIT_CODE_HASH = '0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f'
export const MINIMUM_LIQUIDITY = JSBI.BigInt(1000)
// exports for internal consumption
export const ZERO = JSBI.BigInt(0)
export const ONE = JSBI.BigInt(1)
export const TWO = JSBI.BigInt(2)
export const THREE = JSBI.BigInt(3)
export const FIVE = JSBI.BigInt(5)
export const TEN = JSBI.BigInt(10)
export const _100 = JSBI.BigInt(100)
export const _997 = JSBI.BigInt(997)
export const _1000 = JSBI.BigInt(1000)
export enum SolidityType {
uint8 = 'uint8',
uint256 = 'uint256'
}
export const SOLIDITY_TYPE_MAXIMA = {
[SolidityType.uint8]: JSBI.BigInt('0xff'),
[SolidityType.uint256]: JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')
}