@@ -5,6 +5,12 @@ import { BigNumber } from 'ethers/lib/ethers';
5
5
6
6
export { TransactionReceipt } from 'ethereum-types' ;
7
7
8
+ /**
9
+ * SetJSConfig is needed to initialize a new Set instance. SetJSConfig needs an
10
+ * Ethereum provider (either ethers or web3). SetJSConfig also needs Set module
11
+ * addresses which can be found on
12
+ * https://docs.tokensets.com/contracts/deployed/protocol
13
+ */
8
14
export interface SetJSConfig {
9
15
ethersProvider ?: Provider ;
10
16
web3Provider ?: Web3CoreProvider ;
@@ -62,20 +68,61 @@ export type Position = {
62
68
} ;
63
69
64
70
export type StreamingFeeInfo = {
71
+ /**
72
+ * Address to accrue fees to
73
+ */
65
74
feeRecipient : string ;
75
+ /**
76
+ * Percent of Set accruing to manager annually (1% = 1e16, 100% = 1e18)
77
+ */
66
78
streamingFeePercentage : BigNumber ;
79
+ /**
80
+ * The amount of streaming fees that haven't been actualized to the fee receipient yet
81
+ */
67
82
unaccruedFees : BigNumber ;
68
83
} ;
69
84
70
85
export type SetDetailsWithStreamingInfo = {
86
+ /**
87
+ * Set name (e.g. "DeFi Pulse Index")
88
+ */
71
89
name : string ;
90
+ /**
91
+ * Set symbol (e.g. "DPI")
92
+ */
72
93
symbol : string ;
94
+ /**
95
+ * The address of the set manager
96
+ */
73
97
manager : string ;
98
+ /**
99
+ * List of module addresses that have been abled on this set
100
+ */
74
101
modules : Address [ ] ;
102
+ /**
103
+ * Status of each module represented as 0, 1, or 2. Every element in this list
104
+ * corresponds to an element of the same index in modules.
105
+ *
106
+ * 0 => NONE
107
+ * 1 => PENDING
108
+ * 2 => INITIALIZED
109
+ */
75
110
moduleStatuses : number [ ] ;
111
+ /**
112
+ * A list of positions that compose this Set
113
+ */
76
114
positions : Position [ ] ;
115
+ /**
116
+ * Address to accrue fees to
117
+ */
77
118
feeRecipient : string ;
119
+ /**
120
+ * Percent of Set accruing to manager annually (1% = 1e16, 100% = 1e18)
121
+ */
78
122
streamingFeePercentage : BigNumber ;
123
+ /**
124
+ * The amount of streaming fees that haven't been actualized to the fee receipient yet
125
+ */
79
126
unaccruedFees : BigNumber ;
80
127
} ;
81
128
0 commit comments