mirror of
				https://github.com/Instadapp/smart-contract.git
				synced 2024-07-29 22:08:07 +00:00 
			
		
		
		
	Uniswap pool integration complete
This commit is contained in:
		
							parent
							
								
									222f6ec10e
								
							
						
					
					
						commit
						3ce7974f67
					
				|  | @ -83,7 +83,7 @@ contract Helper { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| contract InstaUniswapPool is Helper { | contract Pool is Helper { | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * @dev Uniswap's pool basic details |      * @dev Uniswap's pool basic details | ||||||
|  | @ -102,9 +102,8 @@ contract InstaUniswapPool is Helper { | ||||||
|         uint tokenReserve |         uint tokenReserve | ||||||
|     ) |     ) | ||||||
|     { |     { | ||||||
|         UniswapPool uniswapExchange = UniswapPool(poolAddress); |  | ||||||
|         poolAddress = getAddressPool(token); |         poolAddress = getAddressPool(token); | ||||||
|         totalSupply = uniswapExchange.totalSupply(); |         totalSupply = IERC20(poolAddress).totalSupply(); | ||||||
|         (ethReserve, tokenReserve) = getBal(token, poolAddress); |         (ethReserve, tokenReserve) = getBal(token, poolAddress); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -155,4 +154,21 @@ contract InstaUniswapPool is Helper { | ||||||
|         IERC20(token).transfer(msg.sender, tokenReturned); |         IERC20(token).transfer(msg.sender, tokenReturned); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | contract InstaUniswapPool is Pool { | ||||||
|  | 
 | ||||||
|  |     uint public version; | ||||||
|  |      | ||||||
|  |     /** | ||||||
|  |      * @dev setting up variables on deployment | ||||||
|  |      * 1...2...3 versioning in each subsequent deployments | ||||||
|  |      */ | ||||||
|  |     constructor(uint _version) public { | ||||||
|  |         version = _version; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     function() external payable {} | ||||||
|  | 
 | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Samyak Jain
						Samyak Jain