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 {
3232 // Constants
3333
3434 /// @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
3636
3737 //--------------------------------------------------------------------------
3838 // Attributes
@@ -158,7 +158,7 @@ contract WAMPL is ERC20, ERC20Permit {
158158
159159 /// @return The total AMPLs held by this contract.
160160 function totalUnderlying () external view returns (uint256 ) {
161- return _queryUnderlyingBalance ( );
161+ return _wampleToAmple ( totalSupply (), _queryAMPLSupply () );
162162 }
163163
164164 /// @param owner The account address.
@@ -187,11 +187,6 @@ contract WAMPL is ERC20, ERC20Permit {
187187 return IERC20 (_ampl).totalSupply ();
188188 }
189189
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-
195190 //--------------------------------------------------------------------------
196191 // Pure methods
197192
Original file line number Diff line number Diff line change @@ -21,19 +21,22 @@ export default {
2121 rinkeby : {
2222 url : `https://rinkeby.infura.io/v3/${ process . env . INFURA_SECRET } ` ,
2323 accounts : {
24- mnemonic : process . env . DEV_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
24+ mnemonic :
25+ process . env . DEV_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
2526 } ,
2627 } ,
2728 kovan : {
2829 url : `https://kovan.infura.io/v3/${ process . env . INFURA_SECRET } ` ,
2930 accounts : {
30- mnemonic : process . env . DEV_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
31+ mnemonic :
32+ process . env . DEV_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
3133 } ,
3234 } ,
3335 mainnet : {
3436 url : `https://mainnet.infura.io/v3/${ process . env . INFURA_SECRET } ` ,
3537 accounts : {
36- mnemonic : process . env . PROD_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
38+ mnemonic :
39+ process . env . PROD_MNEMONIC || Wallet . createRandom ( ) . mnemonic . phrase ,
3740 } ,
3841 } ,
3942 } ,
You can’t perform that action at this time.
0 commit comments