-
Notifications
You must be signed in to change notification settings - Fork 11
/
types.ts
53 lines (46 loc) · 973 Bytes
/
types.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
export type Address = `0x${string}`;
export type Hex = `0x${string}`;
export enum PoolType {
AaveLinear = 'AaveLinear',
ComposableStable = 'ComposableStable',
CowAmm = 'CowAmm',
Fx = 'FX',
Gyro2 = 'Gyro2',
Gyro3 = 'Gyro3',
GyroE = 'GyroE',
MetaStable = 'MetaStable',
Stable = 'Stable',
Weighted = 'Weighted',
Boosted = 'Boosted',
}
export enum SwapKind {
GivenIn = 0,
GivenOut = 1,
}
export interface SingleSwap {
poolId: Hex;
kind: SwapKind;
assetIn: Address;
assetOut: Address;
amount: bigint;
userData: Hex;
}
export interface BatchSwapStep {
poolId: Hex;
assetInIndex: bigint;
assetOutIndex: bigint;
amount: bigint;
userData: Hex;
}
export type InputToken = {
address: Address;
decimals: number;
};
export type InputAmount = InputToken & {
rawAmount: bigint;
};
export enum TokenType {
STANDARD = 0,
TOKEN_WITH_RATE = 1,
ERC4626_TOKEN = 2,
}