File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ contract WAMPL is ERC20, ERC20Permit {
32
32
// Constants
33
33
34
34
/// @dev The maximum wAMPL supply.
35
- uint256 public constant MAX_WAMPL_SUPPLY = 10000000 * (10 ** 18 ); // 10 M
35
+ uint256 public constant MAX_WAMPL_SUPPLY = 10000000 * (10 ** 18 ); // 10 M
36
36
37
37
//--------------------------------------------------------------------------
38
38
// Attributes
@@ -158,7 +158,7 @@ contract WAMPL is ERC20, ERC20Permit {
158
158
159
159
/// @return The total AMPLs held by this contract.
160
160
function totalUnderlying () external view returns (uint256 ) {
161
- return _queryUnderlyingBalance ( );
161
+ return _wampleToAmple ( totalSupply (), _queryAMPLSupply () );
162
162
}
163
163
164
164
/// @param owner The account address.
@@ -187,11 +187,6 @@ contract WAMPL is ERC20, ERC20Permit {
187
187
return IERC20 (_ampl).totalSupply ();
188
188
}
189
189
190
- /// @dev Queries the AMPL balance of this contract.
191
- function _queryUnderlyingBalance () private view returns (uint256 ) {
192
- return IERC20 (_ampl).balanceOf (address (this ));
193
- }
194
-
195
190
//--------------------------------------------------------------------------
196
191
// Pure methods
197
192
Original file line number Diff line number Diff line change @@ -21,19 +21,22 @@ export default {
21
21
rinkeby : {
22
22
url : `https://rinkeby.infura.io/v3/${ process . env . INFURA_SECRET } ` ,
23
23
accounts : {
24
- mnemonic : process . env . DEV_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
24
+ mnemonic :
25
+ process . env . DEV_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
25
26
} ,
26
27
} ,
27
28
kovan : {
28
29
url : `https://kovan.infura.io/v3/${ process . env . INFURA_SECRET } ` ,
29
30
accounts : {
30
- mnemonic : process . env . DEV_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
31
+ mnemonic :
32
+ process . env . DEV_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
31
33
} ,
32
34
} ,
33
35
mainnet : {
34
36
url : `https://mainnet.infura.io/v3/${ process . env . INFURA_SECRET } ` ,
35
37
accounts : {
36
- mnemonic : process . env . PROD_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
38
+ mnemonic :
39
+ process . env . PROD_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
37
40
} ,
38
41
} ,
39
42
} ,
You can’t perform that action at this time.
0 commit comments