14
14
'use strict' ;
15
15
16
16
import { Address } from '@setprotocol/set-protocol-v2/utils/types' ;
17
- import { BigNumber , ContractTransaction } from 'ethers' ;
18
- import { TransactionOverrides } from '@setprotocol/set-protocol-v2/dist/typechain' ;
17
+ import { BigNumber } from 'ethers' ;
19
18
import { Provider } from '@ethersproject/providers' ;
20
- import { generateTxOpts } from '../../utils/transactions' ;
21
19
import { VAssetDisplayInfo } from '../../types' ;
22
20
23
21
import ContractWrapper from './ContractWrapper' ;
@@ -41,30 +39,6 @@ export default class PerpV2LeverageModuleViewerWrapper {
41
39
this . perpV2LeverageModuleViewerAddress = perpV2LeverageModuleViewerAddress ;
42
40
}
43
41
44
- /**
45
- * Initializes this module to the SetToken. Only callable by the SetToken's manager.
46
- *
47
- * @param setTokenAddress Address of the SetToken to initialize
48
- * @param callerAddress Address of caller (optional)
49
- * @param txOpts Overrides for transaction (optional)
50
- */
51
- public async initialize (
52
- setTokenAddress : Address ,
53
- callerAddress : Address = undefined ,
54
- txOpts : TransactionOverrides = { }
55
- ) : Promise < ContractTransaction > {
56
- const txOptions = await generateTxOpts ( txOpts ) ;
57
- const perpV2LeverageModuleViewerInstance = await this . contracts . loadPerpV2LeverageModuleViewerAsync (
58
- this . perpV2LeverageModuleViewerAddress ,
59
- callerAddress
60
- ) ;
61
-
62
- return await perpV2LeverageModuleViewerInstance . initialize (
63
- setTokenAddress ,
64
- txOptions ,
65
- ) ;
66
- }
67
-
68
42
/**
69
43
* Gets the address of the collateral token
70
44
*
@@ -94,7 +68,7 @@ export default class PerpV2LeverageModuleViewerWrapper {
94
68
* @param slippage Expected slippage from entering position in precise units (1% = 10^16)
95
69
* @param callerAddress Address of the method caller
96
70
*
97
- * @return Maximum amount of Sets that can be issued
71
+ * @return Maximum amount of Sets that can be issued (10^18 decimals)
98
72
*/
99
73
public async getMaximumSetTokenIssueAmount (
100
74
setTokenAddress : Address ,
@@ -119,7 +93,7 @@ export default class PerpV2LeverageModuleViewerWrapper {
119
93
* @param callerAddress Address of the method caller
120
94
*
121
95
* @return Collateral token address
122
- * @return Total collateral value position unit
96
+ * @return Total collateral value position unit (10^18 decimals)
123
97
*/
124
98
public async getTotalCollateralUnit (
125
99
setTokenAddress : Address ,
@@ -143,7 +117,7 @@ export default class PerpV2LeverageModuleViewerWrapper {
143
117
* @param setTokenAddress Instance of the SetToken
144
118
* @param callerAddress Address of the method caller
145
119
*
146
- * @return Array of info concerning size and leverage of current vAsset positions
120
+ * @return VAssetDisplayInfo array containing size/ leverage of current vAsset positions
147
121
*/
148
122
public async getVirtualAssetsDisplayInfo (
149
123
setTokenAddress : Address ,
0 commit comments