Uniswap pool integration complete

This commit is contained in:
Samyak Jain 2019-04-07 04:21:57 +05:30
parent 222f6ec10e
commit 3ce7974f67

View File

@ -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);
} }
@ -156,3 +155,20 @@ contract InstaUniswapPool is Helper {
} }
} }
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 {}
}