/
machines.ts
53 lines (47 loc) 路 1.11 KB
/
machines.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
import { MockERC20 } from "types/generated"
import { BN } from "../test-utils/math"
import { Address } from "./common"
import { Basset } from "../test-utils/mstable-objects"
export interface ATokenDetails {
bAsset: Address
aToken: Address
}
export interface CTokenDetails {
bAsset: Address
cToken: Address
}
export enum IntegrationPlatform {
none,
aave,
compound,
}
export interface BassetIntegrationDetails {
bAssets: Array<MockERC20>
bAssetTxFees: boolean[]
platforms?: Array<IntegrationPlatform>
aavePlatformAddress?: Address
aTokens?: Array<ATokenDetails>
cTokens?: Array<CTokenDetails>
}
export interface BassetDetails extends Basset {
address: Address
mAssetUnits: BN
actualBalance: BN
rawBalance?: BN
platformBalance?: BN
}
export interface BasketComposition {
bAssets: Array<BassetDetails>
totalSupply: BN
surplus: BN
sumOfBassets: BN
failed: boolean
undergoingRecol: boolean
colRatio?: BN
}
export interface ActionDetails {
hasLendingMarket: boolean
expectInteraction: boolean
amount?: BN
rawBalance?: BN
}