mirror of
				https://github.com/Instadapp/yield-contract.git
				synced 2024-07-29 21:47:29 +00:00 
			
		
		
		
	setting exchange rate in constructor
This commit is contained in:
		
							parent
							
								
									abeeb63865
								
							
						
					
					
						commit
						73492a3450
					
				|  | @ -61,7 +61,7 @@ contract PoolToken is ReentrancyGuard, DSMath, ERC20Pausable { | ||||||
|     IndexInterface public constant instaIndex = IndexInterface(0x2971AdFa57b20E5a416aE5a708A8655A9c74f723); // Main Index |     IndexInterface public constant instaIndex = IndexInterface(0x2971AdFa57b20E5a416aE5a708A8655A9c74f723); // Main Index | ||||||
| 
 | 
 | ||||||
|     uint private tokenBalance; // total token balance since last rebalancing |     uint private tokenBalance; // total token balance since last rebalancing | ||||||
|     uint public exchangeRate = 10 ** 18; // initial 1 token = 1 |     uint public exchangeRate; // initial 1 token = 1 | ||||||
|     uint public insuranceAmt; // insurance amount to keep pool safe |     uint public insuranceAmt; // insurance amount to keep pool safe | ||||||
| 
 | 
 | ||||||
|     constructor( |     constructor( | ||||||
|  | @ -73,6 +73,7 @@ contract PoolToken is ReentrancyGuard, DSMath, ERC20Pausable { | ||||||
|         baseToken = IERC20(_baseToken); |         baseToken = IERC20(_baseToken); | ||||||
|         baseDecimal = ERC20(_baseToken).decimals(); |         baseDecimal = ERC20(_baseToken).decimals(); | ||||||
|         registry = RegistryInterface(_registry); |         registry = RegistryInterface(_registry); | ||||||
|  |         exchangeRate = 10 ** uint(36 - ERC20(_baseToken).decimals()); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     modifier isChief() { |     modifier isChief() { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Thrilok Kumar
						Thrilok Kumar